From cebf933c185d39d137b04f7c3fe2b673e7ac6e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Sch=C3=A4ttgen?= Date: Tue, 18 Sep 2018 23:56:25 +0200 Subject: [PATCH] Introslide layout improvements --- .../main/java/me/impy/aegis/ui/IntroActivity.java | 15 ++++++++++----- .../res/layout/fragment_authentication_slide.xml | 8 -------- app/src/main/res/values/colors.xml | 1 + 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/me/impy/aegis/ui/IntroActivity.java b/app/src/main/java/me/impy/aegis/ui/IntroActivity.java index 1f140fc4..6be61cfc 100644 --- a/app/src/main/java/me/impy/aegis/ui/IntroActivity.java +++ b/app/src/main/java/me/impy/aegis/ui/IntroActivity.java @@ -6,6 +6,7 @@ import android.support.v4.app.Fragment; import android.view.WindowManager; import com.github.paolorotolo.appintro.AppIntro; +import com.github.paolorotolo.appintro.AppIntro2; import com.github.paolorotolo.appintro.AppIntroFragment; import com.github.paolorotolo.appintro.model.SliderPage; @@ -31,7 +32,7 @@ import me.impy.aegis.ui.slides.CustomAuthenticatedSlide; import me.impy.aegis.ui.slides.CustomAuthenticationSlide; import me.impy.aegis.ui.tasks.DerivationTask; -public class IntroActivity extends AppIntro implements DerivationTask.Callback { +public class IntroActivity extends AppIntro2 implements DerivationTask.Callback { public static final int RESULT_OK = 0; public static final int RESULT_EXCEPTION = 1; @@ -61,26 +62,30 @@ public class IntroActivity extends AppIntro implements DerivationTask.Callback { pager.setPagingEnabled(false); //showPagerIndicator(false); setGoBackLock(true); + setBarColor(getResources().getColor(R.color.colorPrimary)); SliderPage homeSliderPage = new SliderPage(); homeSliderPage.setTitle("Welcome"); + homeSliderPage.setTitleColor(getResources().getColor(R.color.primary_text_dark)); homeSliderPage.setDescription("Aegis is a secure, free and open source 2FA app"); + homeSliderPage.setDescColor(getResources().getColor(R.color.primary_text_dark)); homeSliderPage.setImageDrawable(R.drawable.intro_shield); - homeSliderPage.setBgColor(getResources().getColor(R.color.colorPrimary)); + homeSliderPage.setBgColor(getResources().getColor(R.color.colorSecondary)); addSlide(AppIntroFragment.newInstance(homeSliderPage)); _authenticationSlide = new CustomAuthenticationSlide(); - _authenticationSlide.setBgColor(getResources().getColor(R.color.colorHeaderSuccess)); + _authenticationSlide.setBgColor(getResources().getColor(R.color.colorSecondary)); + //_authenticationSlide.setDescColor(getResources().getColor(R.color.primary_text_dark)); addSlide(_authenticationSlide); _authenticatedSlide = new CustomAuthenticatedSlide(); - _authenticatedSlide.setBgColor(getResources().getColor(R.color.colorPrimary)); + _authenticatedSlide.setBgColor(getResources().getColor(R.color.colorSecondary)); addSlide(_authenticatedSlide); SliderPage endSliderPage = new SliderPage(); endSliderPage.setTitle("All done!"); endSliderPage.setDescription("Aegis has been set up and is ready to go."); endSliderPage.setImageDrawable(R.drawable.intro_shield); - endSliderPage.setBgColor(getResources().getColor(R.color.colorPrimary)); + endSliderPage.setBgColor(getResources().getColor(R.color.colorSecondary)); _endSlide = AppIntroFragment.newInstance(endSliderPage); addSlide(_endSlide); diff --git a/app/src/main/res/layout/fragment_authentication_slide.xml b/app/src/main/res/layout/fragment_authentication_slide.xml index c480af0a..edc2fc88 100644 --- a/app/src/main/res/layout/fragment_authentication_slide.xml +++ b/app/src/main/res/layout/fragment_authentication_slide.xml @@ -18,14 +18,6 @@ android:layout_marginTop="30dp" android:textStyle="bold" /> - - #0d47a1 + #FF1565C0 #002171 #12b600 #5472d3