use of org.holoeverywhere.app.AlertDialog.Builder in project HoloEverywhere by Prototik.
the class _RingtonePickerDialog method create.
public _RingtonePickerDialog create() {
if (dialog != null) {
return this;
}
handler = new Handler();
hasDefaultItem = intent.getBooleanExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
uriForDefaultItem = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI);
if (uriForDefaultItem == null) {
uriForDefaultItem = Settings.System.DEFAULT_RINGTONE_URI;
}
hasSilentItem = intent.getBooleanExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
ringtoneManager = new RingtoneManager(context);
final boolean includeDrm = intent.getBooleanExtra(RingtoneManager.EXTRA_RINGTONE_INCLUDE_DRM, true);
ringtoneManager.setIncludeDrm(includeDrm);
int types = intent.getIntExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, -1);
if (types != -1) {
ringtoneManager.setType(types);
}
cursor = ringtoneManager.getCursor();
if (context instanceof Activity) {
((Activity) context).setVolumeControlStream(ringtoneManager.inferStreamType());
}
existingUri = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI);
builder = new AlertDialog.Builder(context);
dialog = onCreateDialog(builder);
return this;
}
use of org.holoeverywhere.app.AlertDialog.Builder in project little-bear-dictionary by daimajia.
the class RingtonePicker method create.
public RingtonePicker create() {
if (dialog != null) {
return this;
}
handler = new Handler();
hasDefaultItem = intent.getBooleanExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
uriForDefaultItem = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI);
if (uriForDefaultItem == null) {
uriForDefaultItem = Settings.System.DEFAULT_RINGTONE_URI;
}
hasSilentItem = intent.getBooleanExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
ringtoneManager = new RingtoneManager(context);
final boolean includeDrm = intent.getBooleanExtra(RingtoneManager.EXTRA_RINGTONE_INCLUDE_DRM, true);
ringtoneManager.setIncludeDrm(includeDrm);
int types = intent.getIntExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, -1);
if (types != -1) {
ringtoneManager.setType(types);
}
cursor = ringtoneManager.getCursor();
if (context instanceof Activity) {
((Activity) context).setVolumeControlStream(ringtoneManager.inferStreamType());
}
existingUri = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI);
builder = new AlertDialog.Builder(context);
dialog = onCreateDialog(builder);
return this;
}
use of org.holoeverywhere.app.AlertDialog.Builder in project HoloEverywhere by Prototik.
the class DialogsAlertDialogFragment method onCreateDialog.
@Override
public AlertDialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getSupportActivity());
builder.setTitle(R.string.library_name);
builder.setIcon(R.drawable.icon);
prepareBuilder(builder);
return builder.create();
}
Aggregations