FileDocCategorySizeDatePackage
ChooseLockPatternTutorial.javaAPI DocAndroid 1.5 API2598Wed May 06 22:42:48 BST 2009com.android.settings

ChooseLockPatternTutorial

public class ChooseLockPatternTutorial extends android.app.Activity implements View.OnClickListener

Fields Summary
private static final int
REQUESTCODE_EXAMPLE
private android.view.View
mNextButton
private android.view.View
mSkipButton
Constructors Summary
Methods Summary
private voidinitViews()

        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 voidonActivityResult(int requestCode, int resultCode, android.content.Intent data)

        if (requestCode == REQUESTCODE_EXAMPLE && resultCode == ChooseLockPattern.RESULT_FINISHED) {
            setResult(resultCode);
            finish();
        }
    
public voidonClick(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 voidonCreate(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();
        }