mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 05:52:52 +00:00
Added minor improvements to the Intro
This commit is contained in:
parent
9859011a6d
commit
8b280ddbb0
6 changed files with 100 additions and 57 deletions
|
@ -58,7 +58,9 @@ public class IntroActivity extends AppIntro implements DerivationTask.Callback {
|
|||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
|
||||
setWizardMode(true);
|
||||
showSkipButton(false);
|
||||
pager.setPagingEnabled(false);
|
||||
//showPagerIndicator(false);
|
||||
setGoBackLock(true);
|
||||
|
||||
|
@ -69,19 +71,6 @@ public class IntroActivity extends AppIntro implements DerivationTask.Callback {
|
|||
homeSliderPage.setBgColor(getResources().getColor(R.color.colorPrimary));
|
||||
addSlide(AppIntroFragment.newInstance(homeSliderPage));
|
||||
|
||||
SliderPage permSliderPage = new SliderPage();
|
||||
permSliderPage.setTitle("Permissions");
|
||||
permSliderPage.setDescription("Aegis needs permission to use your camera in order to scan QR codes. " +
|
||||
"It also needs access to external storage to able to export the database.");
|
||||
permSliderPage.setImageDrawable(R.drawable.intro_scanner);
|
||||
permSliderPage.setBgColor(getResources().getColor(R.color.colorAccent));
|
||||
addSlide(AppIntroFragment.newInstance(permSliderPage));
|
||||
askForPermissions(new String[]{
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
}, 2);
|
||||
|
||||
_authenticationSlide = new CustomAuthenticationSlide();
|
||||
_authenticationSlide.setBgColor(getResources().getColor(R.color.colorHeaderSuccess));
|
||||
addSlide(_authenticationSlide);
|
||||
|
@ -124,7 +113,7 @@ public class IntroActivity extends AppIntro implements DerivationTask.Callback {
|
|||
// skip to the last slide if no encryption will be used
|
||||
if (cryptType == CustomAuthenticationSlide.CRYPT_TYPE_NONE) {
|
||||
// TODO: no magic indices
|
||||
getPager().setCurrentItem(5);
|
||||
getPager().setCurrentItem(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,10 @@ import android.support.v4.app.Fragment;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.github.paolorotolo.appintro.ISlidePolicy;
|
||||
|
@ -23,6 +25,7 @@ public class CustomAuthenticationSlide extends Fragment implements ISlidePolicy,
|
|||
public static final int CRYPT_TYPE_PASS = 2;
|
||||
public static final int CRYPT_TYPE_FINGER = 3;
|
||||
|
||||
private Spinner _authenticationSpinner;
|
||||
private RadioGroup _buttonGroup;
|
||||
private int _bgColor;
|
||||
|
||||
|
@ -38,8 +41,8 @@ public class CustomAuthenticationSlide extends Fragment implements ISlidePolicy,
|
|||
if (manager != null) {
|
||||
RadioButton button = view.findViewById(R.id.rb_fingerprint);
|
||||
TextView text = view.findViewById(R.id.text_rb_fingerprint);
|
||||
button.setVisibility(View.VISIBLE);
|
||||
text.setVisibility(View.VISIBLE);
|
||||
button.setEnabled(false);
|
||||
text.setEnabled(false);
|
||||
}
|
||||
|
||||
view.findViewById(R.id.main).setBackgroundColor(_bgColor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue