First, how can i read dynamic database's title show in my Dialog now.
But the class is activity now and my other class for
database is inherent from listactivity.
furthermore, I already know the length of database
title.
private void accountcheck(String mess)
{
mDbHelper = new NotesDbAdapter2(this);
mDbHelper.open();
mNotesCursor = mDbHelper.fetchAllNotes();
startManagingCursor(mNotesCursor);
//showDialog("wretch OK!");
String[] from = new String[]{NotesDbAdapter2.KEY_ALIAS};
int[] to = new int[]{R.id.text1};
showDialog(from[1]);
// Now create a simple cursor adapter and set it to display
CharSequence string2[]=new String[]{NotesDbAdapter2.KEY_ALIAS};
SimpleCursorAdapter notes =
new SimpleCursorAdapter(this, R.layout.notes_row, mNotesCursor,
from, to);
//showDialog();
final boolean new_state_array[] ={false,false,false,false};
AlertDialog.Builder a = new AlertDialog.Builder(Publisher.this);
a.setIcon(R.drawable.icon);
a.setTitle(R.string.select_dialog_items);
a.setMultiChoiceItems(
R.array.alert_dialog_multi_choice,
new_state_array,
new DialogInterface.OnMultiChoiceClickListener() {
public void onClick(DialogInterface dialog, int
whichButton, boolean isChecked)
{
new_state_array[whichButton] = isChecked;
}
});
a.setPositiveButton(R.string.alert_dialog_ok, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {
for(int i=0;i<databaselenght;i++)
{
if( new_state_array[i]==true)
{
if(i==0)
{
showDialog("wretch OK!");
}
if(i==1)
{
showDialog("Yam OK!");
}
if(i==2)
{
showDialog("fcuk OK!");
}
if(i==3)
{
showDialog("fucku OK!");
}
}
}
}
});
a.setNegativeButton(R.string.alert_dialog_cancel, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {
}
}
).show();
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en