Introslide layout improvements

This commit is contained in:
Michael Schättgen 2018-09-18 23:56:25 +02:00
parent ec2cfb4442
commit cebf933c18
3 changed files with 11 additions and 13 deletions

View file

@ -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);

View file

@ -18,14 +18,6 @@
android:layout_marginTop="30dp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="140dp"
android:layout_marginBottom="100dp"
android:layout_marginTop="70dp"
app:srcCompat="@drawable/ic_id_card" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#0d47a1</color>
<color name="colorSecondary">#FF1565C0</color>
<color name="colorPrimaryDark">#002171</color>
<color name="colorHeaderSuccess">#12b600</color>
<color name="colorPrimaryLight">#5472d3</color>