mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
use new confirm-delete-all dialog to confirm deletion of dictionary
This commit is contained in:
parent
4c17ea8802
commit
7ad4a43468
2 changed files with 14 additions and 3 deletions
|
@ -186,6 +186,9 @@
|
|||
these changes?</string>
|
||||
<string name="confirm_delete_all">Are you sure you want to
|
||||
delete all games? This action cannot be undone.</string>
|
||||
<string name="confirm_delete_dict">Are you sure you want to delete
|
||||
this dictionary? You will not be able to open any games that use
|
||||
it.</string>
|
||||
|
||||
<string name="hints_allowed">Allow hints</string>
|
||||
<string name="progress_title">Searching for moves</string>
|
||||
|
|
|
@ -26,6 +26,7 @@ import android.widget.Button;
|
|||
import android.widget.TextView;
|
||||
import android.widget.AdapterView;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ContextMenu;
|
||||
|
@ -142,10 +143,17 @@ public class DictsActivity extends XWListActivity
|
|||
}
|
||||
|
||||
// DeleteCallback interface
|
||||
public void deleteCalled( int myPosition )
|
||||
public void deleteCalled( final int myPosition )
|
||||
{
|
||||
GameUtils.deleteDict( this, m_dicts[myPosition] );
|
||||
mkListAdapter();
|
||||
DialogInterface.OnClickListener action =
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick( DialogInterface dlg, int item ) {
|
||||
GameUtils.deleteDict( DictsActivity.this,
|
||||
m_dicts[myPosition] );
|
||||
mkListAdapter();
|
||||
}
|
||||
};
|
||||
showConfirmThen( R.string.confirm_delete_dict, action );
|
||||
}
|
||||
|
||||
private void mkListAdapter()
|
||||
|
|
Loading…
Reference in a new issue