From 23bbc8d34c026e5ca9afd09be57d90f979ad4cf2 Mon Sep 17 00:00:00 2001 From: Finn M Glas Date: Fri, 22 May 2020 18:21:30 +0200 Subject: [PATCH] Make colors apply on older APIs, Accellerate tooltip amimation --- app/src/main/java/com/finnmglas/launcher/Functions.kt | 4 ++-- app/src/main/res/layout/activity_choose.xml | 1 + app/src/main/res/layout/activity_firststartup.xml | 1 + app/src/main/res/layout/activity_main.xml | 1 + app/src/main/res/layout/fragment_settings_apps.xml | 1 + app/src/main/res/layout/fragment_settings_launcher.xml | 1 + app/src/main/res/layout/fragment_settings_theme.xml | 1 + app/src/main/res/values/styles.xml | 2 ++ 8 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/finnmglas/launcher/Functions.kt b/app/src/main/java/com/finnmglas/launcher/Functions.kt index 6bbc484..cf92058 100644 --- a/app/src/main/java/com/finnmglas/launcher/Functions.kt +++ b/app/src/main/java/com/finnmglas/launcher/Functions.kt @@ -47,14 +47,14 @@ fun View.blink( }) } -fun View.fadeIn(duration: Long = 1000L) { +fun View.fadeIn(duration: Long = 300L) { startAnimation(AlphaAnimation(0f, 1f).also { it.interpolator = DecelerateInterpolator() it.duration = duration }) } -fun View.fadeOut(duration: Long = 1000L) { +fun View.fadeOut(duration: Long = 300L) { startAnimation(AlphaAnimation(1f, 0f).also { it.interpolator = DecelerateInterpolator() it.duration = duration diff --git a/app/src/main/res/layout/activity_choose.xml b/app/src/main/res/layout/activity_choose.xml index 39648bf..92d2658 100644 --- a/app/src/main/res/layout/activity_choose.xml +++ b/app/src/main/res/layout/activity_choose.xml @@ -5,6 +5,7 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/colorPrimary" tools:context=".ChooseActivity"> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index a38a577..22f25bc 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,6 +5,7 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/colorPrimary" android:longClickable="false" tools:context=".MainActivity"> diff --git a/app/src/main/res/layout/fragment_settings_apps.xml b/app/src/main/res/layout/fragment_settings_apps.xml index bc520e6..1dc16f2 100644 --- a/app/src/main/res/layout/fragment_settings_apps.xml +++ b/app/src/main/res/layout/fragment_settings_apps.xml @@ -5,6 +5,7 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/colorPrimary" android:gravity="center|top" android:orientation="vertical" android:padding="32sp" diff --git a/app/src/main/res/layout/fragment_settings_launcher.xml b/app/src/main/res/layout/fragment_settings_launcher.xml index 72f7a67..49f7a5d 100644 --- a/app/src/main/res/layout/fragment_settings_launcher.xml +++ b/app/src/main/res/layout/fragment_settings_launcher.xml @@ -5,6 +5,7 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/colorPrimary" android:gravity="center|top" android:orientation="vertical" android:padding="32sp" diff --git a/app/src/main/res/layout/fragment_settings_theme.xml b/app/src/main/res/layout/fragment_settings_theme.xml index be447f6..829c5d9 100644 --- a/app/src/main/res/layout/fragment_settings_theme.xml +++ b/app/src/main/res/layout/fragment_settings_theme.xml @@ -5,6 +5,7 @@ android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/colorPrimary" android:gravity="center|top" android:orientation="vertical" android:padding="32sp" diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 3a08abd..7e0490f 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -10,6 +10,7 @@ @color/finnmglasTheme_text_color @style/Widget.AppCompat.Button.Colored + @color/finnmglasTheme_accent_color true @@ -24,6 +25,7 @@ @color/darkTheme_text_color @style/Widget.AppCompat.Button.Colored + @color/darkTheme_accent_color true