Java 类android.text.method.CharacterPickerDialog 实例源码
项目:Android-DialogFragments
文件:ItemsAlertDialogExample.java
@Override
public void showDialog(DialogFragmentCallbackProvider provider, FragmentManager fragmentManager){
String[] items = {
AlertDialog.class.getSimpleName(),
CharacterPickerDialog.class.getSimpleName(),
ProgressDialog.class.getSimpleName(),
DatePickerDialog.class.getSimpleName(),
TimePickerDialog.class.getSimpleName(),
};
Bundle extra = new Bundle();
extra.putStringArray("items", items);
new AlertDialogFragment.Builder(context).setIcon(R.drawable.ic_launcher)
.setTitle(R.string.dialog_title)
.setItems(items)
.setExtra(extra)
.setNegativeButton(R.string.dialog_cancel, null)
.show(fragmentManager, label);
}
项目:Android-DialogFragments
文件:MultiChoiceAlertDialogExample.java
@Override
public void showDialog(DialogFragmentCallbackProvider provider, FragmentManager fragmentManager){
String[] items = new String[]{
AlertDialog.class.getSimpleName(),
CharacterPickerDialog.class.getSimpleName(),
ProgressDialog.class.getSimpleName(),
DatePickerDialog.class.getSimpleName(),
TimePickerDialog.class.getSimpleName(),
};
boolean[] checkedItems = {
true,
false,
true,
false,
true
};
Bundle extra = new Bundle();
extra.putStringArray("items", items);
new AlertDialogFragment.Builder(context).setIcon(R.drawable.ic_launcher)
.setTitle(R.string.dialog_title)
.setMultiChoiceItems(items, checkedItems)
.setExtra(extra)
.setPositiveButton(R.string.dialog_ok, null)
.setNegativeButton(R.string.dialog_cancel, null)
.show(fragmentManager, label);
}
项目:Android-DialogFragments
文件:SingleChoiceAlertDialogExample.java
@Override
public void showDialog(DialogFragmentCallbackProvider provider, FragmentManager fragmentManager){
String[] items = {
AlertDialog.class.getSimpleName(),
CharacterPickerDialog.class.getSimpleName(),
ProgressDialog.class.getSimpleName(),
DatePickerDialog.class.getSimpleName(),
TimePickerDialog.class.getSimpleName(),
};
Bundle extra = new Bundle();
extra.putStringArray("items", items);
new AlertDialogFragment.Builder(context).setIcon(R.drawable.ic_launcher)
.setTitle(R.string.dialog_title)
.setSingleChoiceItems(items, 3)
.setExtra(extra)
.setPositiveButton(R.string.dialog_ok, null)
.setNegativeButton(R.string.dialog_cancel, null)
.show(fragmentManager, label);
}
项目:Android-DialogFragments
文件:ItemsAlertDialogExample.java
@Override
public void showDialog(DialogFragmentCallbackProvider provider, FragmentManager fragmentManager){
String[] items = {
AlertDialog.class.getSimpleName(),
CharacterPickerDialog.class.getSimpleName(),
ProgressDialog.class.getSimpleName(),
DatePickerDialog.class.getSimpleName(),
TimePickerDialog.class.getSimpleName(),
};
Bundle extra = new Bundle();
extra.putStringArray("items", items);
new AlertDialogFragment.Builder(context).setIcon(R.drawable.ic_launcher)
.setTitle(R.string.dialog_title)
.setItems(items)
.setExtra(extra)
.setNegativeButton(R.string.dialog_cancel, null)
.show(fragmentManager, label);
}
项目:Android-DialogFragments
文件:MultiChoiceAlertDialogExample.java
@Override
public void showDialog(DialogFragmentCallbackProvider provider, FragmentManager fragmentManager){
String[] items = new String[]{
AlertDialog.class.getSimpleName(),
CharacterPickerDialog.class.getSimpleName(),
ProgressDialog.class.getSimpleName(),
DatePickerDialog.class.getSimpleName(),
TimePickerDialog.class.getSimpleName(),
};
boolean[] checkedItems = {
true,
false,
true,
false,
true
};
Bundle extra = new Bundle();
extra.putStringArray("items", items);
new AlertDialogFragment.Builder(context).setIcon(R.drawable.ic_launcher)
.setTitle(R.string.dialog_title)
.setMultiChoiceItems(items, checkedItems)
.setExtra(extra)
.setPositiveButton(R.string.dialog_ok, null)
.setNegativeButton(R.string.dialog_cancel, null)
.show(fragmentManager, label);
}
项目:Android-DialogFragments
文件:SingleChoiceAlertDialogExample.java
@Override
public void showDialog(DialogFragmentCallbackProvider provider, FragmentManager fragmentManager){
String[] items = {
AlertDialog.class.getSimpleName(),
CharacterPickerDialog.class.getSimpleName(),
ProgressDialog.class.getSimpleName(),
DatePickerDialog.class.getSimpleName(),
TimePickerDialog.class.getSimpleName(),
};
Bundle extra = new Bundle();
extra.putStringArray("items", items);
new AlertDialogFragment.Builder(context).setIcon(R.drawable.ic_launcher)
.setTitle(R.string.dialog_title)
.setSingleChoiceItems(items, 3)
.setExtra(extra)
.setPositiveButton(R.string.dialog_ok, null)
.setNegativeButton(R.string.dialog_cancel, null)
.show(fragmentManager, label);
}
项目:Android-DialogFragments
文件:BasicStringPickerDialogExample.java
@Override
public void showDialog(DialogFragmentCallbackProvider provider, FragmentManager fragmentManager){
String[] values = {
AlertDialog.class.getSimpleName(),
CharacterPickerDialog.class.getSimpleName(),
ProgressDialog.class.getSimpleName(),
DatePickerDialog.class.getSimpleName(),
TimePickerDialog.class.getSimpleName(),
};
StringPickerDialogFragment dialogFragment = StringPickerDialogFragment.newInstance(provider, values);
dialogFragment.setIcon(R.drawable.ic_launcher);
dialogFragment.setTitle(R.string.dialog_title);
dialogFragment.show(fragmentManager, label);
}
项目:Android-DialogFragments
文件:BasicStringPickerDialogExample.java
@Override
public void showDialog(DialogFragmentCallbackProvider provider, FragmentManager fragmentManager){
String[] values = {
AlertDialog.class.getSimpleName(),
CharacterPickerDialog.class.getSimpleName(),
ProgressDialog.class.getSimpleName(),
DatePickerDialog.class.getSimpleName(),
TimePickerDialog.class.getSimpleName(),
};
StringPickerDialogFragment dialogFragment = StringPickerDialogFragment.newInstance(provider, values);
dialogFragment.setIcon(R.drawable.ic_launcher);
dialogFragment.setTitle(R.string.dialog_title);
dialogFragment.show(fragmentManager, label);
}