Skip to content

Commit

Permalink
temp: add other buttons on new sponsors dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
SVNKoch committed Dec 13, 2022
1 parent fe4104f commit 1cdbeed
Showing 1 changed file with 33 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,40 @@ public void onClick(DialogInterface dialog, int which) {

editByHandSaveDialogListener.settingStart = isStart;
editByHandSaveDialogListener.editText = new WeakReference<>(textView);
//new AlertDialog.Builder(context)
// .setTitle(str(isStart ? "new_segment_time_start" : "new_segment_time_end"))
// .setView(textView)
// .setNegativeButton(android.R.string.cancel, null)
// .setNeutralButton(str("new_segment_now"), editByHandSaveDialogListener)
// .setPositiveButton(android.R.string.ok, editByHandSaveDialogListener)
// .show();

new AlertDialog.Builder(context)
.setTitle(str(isStart ? "new_segment_time_start" : "new_segment_time_end"))
.setView(textView)
.setNegativeButton(android.R.string.cancel, null)
.setNeutralButton(str("new_segment_now"), editByHandSaveDialogListener)
.setPositiveButton(android.R.string.ok, editByHandSaveDialogListener)
.show();
.setTitle("Title")
.setView(textView)
.setItems(new CharSequence[]
{"button 1", "button 2", "button 3", "button 4"},
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// The 'which' argument contains the index position
// of the selected item
switch (which) {
case 0:
Toast.makeText(context, "clicked 1", Toast.LENGTH_SHORT).show();
break;
case 1:
Toast.makeText(context, "clicked 2", Toast.LENGTH_SHORT).show();
break;
case 2:
Toast.makeText(context, "clicked 3", Toast.LENGTH_SHORT).show();
break;
case 3:
Toast.makeText(context, "clicked 4", Toast.LENGTH_SHORT).show();
break;
}
}
})
.show();

dialog.dismiss();
};
Expand Down

0 comments on commit 1cdbeed

Please sign in to comment.