Android Open Source - UnlockCounter m Dialog Pref






From Project

Back to project page UnlockCounter.

License

The source code is released under:

MIT License

If you think the Android project UnlockCounter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.vaya.unlockcounter;
//from   w  w w  . ja v  a 2s .c  o m
import android.content.Context;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.View;

/**
 * Created by vayan on 6/29/14.
 */
public class mDialogPref extends DialogPreference {

    private Context ctx;

    public mDialogPref(Context context, AttributeSet attrs) {
        super(context, attrs);
        ctx = context;
    }

    // along with constructors, you will want to override
    @Override
    protected void onBindDialogView(View view) {
        super.onBindDialogView(view);

    }

    @Override
    protected void onDialogClosed(boolean positiveResult) {
        super.onDialogClosed(positiveResult);

        if (positiveResult) {
            ctx.deleteDatabase(DB.DB_NAME);
        }
    }
}




Java Source Code List

com.vaya.unlockcounter.BroadReceiver.java
com.vaya.unlockcounter.DB.java
com.vaya.unlockcounter.LockerService.java
com.vaya.unlockcounter.MainActivity.java
com.vaya.unlockcounter.SettingsActivity.java
com.vaya.unlockcounter.mBackupAgent.java
com.vaya.unlockcounter.mDialogPref.java