Back to project page UnlockCounter.
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.
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); } } }