Search in sources :

Example 1 with Builder

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;
}
Also used : AlertDialog(org.holoeverywhere.app.AlertDialog) RingtoneManager(android.media.RingtoneManager) Builder(org.holoeverywhere.app.AlertDialog.Builder) Handler(android.os.Handler) Activity(android.app.Activity)

Example 2 with Builder

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;
}
Also used : AlertDialog(org.holoeverywhere.app.AlertDialog) RingtoneManager(android.media.RingtoneManager) Builder(org.holoeverywhere.app.AlertDialog.Builder) Handler(android.os.Handler) Activity(android.app.Activity)

Example 3 with Builder

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();
}
Also used : AlertDialog(org.holoeverywhere.app.AlertDialog) Builder(org.holoeverywhere.app.AlertDialog.Builder) Builder(org.holoeverywhere.app.AlertDialog.Builder)

Aggregations

AlertDialog (org.holoeverywhere.app.AlertDialog)3 Builder (org.holoeverywhere.app.AlertDialog.Builder)3 Activity (android.app.Activity)2 RingtoneManager (android.media.RingtoneManager)2 Handler (android.os.Handler)2