diff options
Diffstat (limited to 'Software/Android_Studio')
4 files changed, 51 insertions, 16 deletions
diff --git a/Software/Android_Studio/ColorCapture/app/build.gradle b/Software/Android_Studio/ColorCapture/app/build.gradle index ef4857b1d..60fc89265 100644 --- a/Software/Android_Studio/ColorCapture/app/build.gradle +++ b/Software/Android_Studio/ColorCapture/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "com.twine.colorcapture" minSdkVersion 22 targetSdkVersion 27 - versionCode 4 - versionName "1.4" + versionCode 5 + versionName "1.5" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/DialogBase.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/DialogBase.java index e132d1b56..e77440810 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/DialogBase.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/mvvm/DialogBase.java @@ -53,7 +53,8 @@ public abstract class DialogBase<BindingView extends ViewDataBinding, VM extends public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setStyle(DialogFragment.STYLE_NO_FRAME, R.style.AppTheme); + //getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent); + setStyle(DialogFragment.STYLE_NO_FRAME, R.style.FullScreenDialogStyle); } @Nullable @@ -131,20 +132,27 @@ public abstract class DialogBase<BindingView extends ViewDataBinding, VM extends public void onStart() { super.onStart(); - getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent); + //getDialog().getWindow().setBackgroundDrawableResource(android.R.color.transparent); - View group = this.getView(); +// View group = this.getView(); +// +// group.post(() -> +// { +// ValueAnimator animator = ValueAnimator.ofFloat(0, 1); +// animator.setDuration(300); +// animator.addUpdateListener((x) -> +// { +// group.setAlpha((Float) x.getAnimatedValue()); +// }); +// animator.start(); +// }); - group.post(() -> - { - ValueAnimator animator = ValueAnimator.ofFloat(0, 1); - animator.setDuration(300); - animator.addUpdateListener((x) -> - { - group.setAlpha((Float) x.getAnimatedValue()); - }); - animator.start(); - }); + Dialog dialog = getDialog(); + if (dialog != null) { + int width = ViewGroup.LayoutParams.MATCH_PARENT; + int height = ViewGroup.LayoutParams.MATCH_PARENT; + dialog.getWindow().setLayout(width, height); + } } public abstract int getLayoutId(); diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/side_menu.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/side_menu.xml index 3369f0a35..7cc3da131 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/side_menu.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/side_menu.xml @@ -175,7 +175,7 @@ android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_marginBottom="60dp" - bind:text="Get a twine TTCâ„¢ card" + bind:text=" Get a twine TTCâ„¢ card" bind:textSize="@dimen/small_font_size" bind:src="@drawable/icon_twine_card" android:clickable="true" /> diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/values/styles.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/values/styles.xml index c283a135d..ba9f0b02a 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/values/styles.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/values/styles.xml @@ -18,6 +18,33 @@ <item name="android:textColor">@color/white</item> </style> + <style name="CustomDialog" parent="@android:style/Theme.Dialog"> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:windowNoTitle">true</item> + <item name="android:windowIsFloating">true</item> + <item name="android:windowIsTranslucent">true</item> + <item name="android:alwaysDrawnWithCache">false</item> + <item name="android:windowContentOverlay">@null</item> + </style> + + <style name="FullScreenDialogStyle" parent="Theme.AppCompat.Dialog"> + <item name="android:windowNoTitle">true</item> + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="colorPrimary">@color/colorPrimary</item> + + <!-- Set this to true if you want Full Screen without status bar --> + <item name="android:windowFullscreen">false</item> + + <item name="android:windowIsFloating">false</item> + + <!-- This is important! Don't forget to set window background --> + <item name="android:windowBackground">@android:color/transparent</item> + + <!-- Additionally if you want animations when dialog opening --> + <item name="android:windowEnterAnimation">@anim/zoom_in</item> + <item name="android:windowExitAnimation">@anim/zoom_out</item> + </style> + <style name="Autocomplete"> <item name="colorControlNormal">@color/text_gray</item> <item name="colorControlActivated">@color/colorPrimaryBackground</item> |
