FileDocCategorySizeDatePackage
IPSettings.javaAPI DocAndroid 5.1 API2374Thu Mar 12 22:22:54 GMT 2015com.android.rs.imagejb

IPSettings

public class IPSettings extends android.app.DialogFragment

Fields Summary
private boolean[]
mEnables
public boolean
mOk
Constructors Summary
public IPSettings(boolean[] enables)


       
        mEnables = enables;
    
Methods Summary
public android.app.DialogonCreateDialog(android.os.Bundle savedInstanceState)

        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        builder.setTitle(R.string.settings);

        // Specify the list array, the items to be selected by default (null for none),
        // and the listener through which to receive callbacks when items are selected
        builder.setMultiChoiceItems(R.array.settings_array, mEnables,
                          new DialogInterface.OnMultiChoiceClickListener() {
                   @Override
                   public void onClick(DialogInterface dialog, int which, boolean isChecked) {
                       mEnables[which] = isChecked;
                   }
               });

        // Set the action buttons
        builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
                   @Override
                   public void onClick(DialogInterface dialog, int id) {
                       mOk = true;
                   }
               });
        builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
                   @Override
                   public void onClick(DialogInterface dialog, int id) {
                   }
               });

        return builder.create();