Methods Summary |
---|
private void | initViews()
setContentView(R.layout.choose_lock_pattern_tutorial);
mNextButton = findViewById(R.id.next_button);
mNextButton.setOnClickListener(this);
mSkipButton = findViewById(R.id.skip_button);
mSkipButton.setOnClickListener(this);
|
protected void | onActivityResult(int requestCode, int resultCode, android.content.Intent data)
if (requestCode == REQUESTCODE_EXAMPLE && resultCode == ChooseLockPattern.RESULT_FINISHED) {
setResult(resultCode);
finish();
}
|
public void | onClick(android.view.View v)
if (v == mSkipButton) {
// Canceling, so finish all
setResult(ChooseLockPattern.RESULT_FINISHED);
finish();
} else if (v == mNextButton) {
startActivityForResult(new Intent(this, ChooseLockPatternExample.class),
REQUESTCODE_EXAMPLE);
}
|
protected void | onCreate(android.os.Bundle savedInstanceState)
super.onCreate(savedInstanceState);
// Don't show the tutorial if the user has seen it before.
LockPatternUtils lockPatternUtils = new LockPatternUtils(getContentResolver());
if (savedInstanceState == null && lockPatternUtils.isPatternEverChosen()) {
Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.ChooseLockPattern");
startActivity(intent);
finish();
} else {
initViews();
}
|