@Override protected void onPrepareDialogBuilder(AlertDialog.Builder builder) { super.onPrepareDialogBuilder(builder); builder.setNegativeButton(null, null); builder.setPositiveButton(null, null); builder.setTitle(null); } }
@Override protected void onPrepareDialogBuilder(AlertDialog.Builder builder) { super.onPrepareDialogBuilder(builder); if (mCloseOnSelected) { // Don't show the positive button; clicking a color will be the "positive" action builder.setPositiveButton(null, null); } }
@Override protected void onPrepareDialogBuilder(AlertDialog.Builder builder) { super.onPrepareDialogBuilder(builder); builder.setNegativeButton(null, null); } }
@Override protected void onPrepareDialogBuilder(AlertDialog.Builder builder) { // we get rid of the default buttons (that close the dialog every time) builder.setPositiveButton(null, null); builder.setNegativeButton(null, null); super.onPrepareDialogBuilder(builder); }
@Override protected void onPrepareDialogBuilder(Builder builder) { super.onPrepareDialogBuilder(builder); builder.setOnKeyListener(this); }
@Override protected void onPrepareDialogBuilder(AlertDialog.Builder builder) { super.onPrepareDialogBuilder(builder); builder.setNegativeButton(null, null) .setPositiveButton(R.string.close, null) .setSingleChoiceItems(mSearchEngineAdapter, 0, null); }
@Override protected void onPrepareDialogBuilder(Builder builder) { super.onPrepareDialogBuilder(builder); builder.setOnKeyListener(this); // builder.setNeutralButton(R.string.reset_key, new OnClickListener() { // // @Override // public void onClick(DialogInterface dialog, int which) { // keyCode = 0; // valueTextView.setText("No Key"); // } // }); }
@Override protected void onPrepareDialogBuilder(Builder builder) { // we "have" to create new views each time LinearLayout layout = new LinearLayout(mContext); layout.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); // layout.setMinimumWidth(400); layout.setPadding(20, 20, 20, 20); mSeekBar = new SeekBar(mContext); mSeekBar.setLayoutParams(new ViewGroup.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); mSeekBar.setMax(mStartMax); mSeekBar.setProgress(mStartProgress); layout.addView(mSeekBar); builder.setView(layout); super.onPrepareDialogBuilder(builder); }
@Override protected void onPrepareDialogBuilder( AlertDialog.Builder builder ) { super.onPrepareDialogBuilder(builder); // Get the fonts on the device m_fontType = new ArrayList< String >(); m_fontType.add("sans-serif"); m_fontType.add("serif"); m_fontType.add("monospace"); // Get the current value to find the checked item String selectedFontface = getSharedPreferences().getString( getKey(), ""); int idx = 0, checked_item = 0; for ( String typeface : m_fontType ) { if ( typeface.equals( selectedFontface ) ) checked_item = idx; idx++; } // Create out adapter // If you're building for API 11 and up, you can pass builder.getContext // instead of current context FontAdapter adapter = new FontAdapter(); builder.setSingleChoiceItems( adapter, checked_item, this ); // The typical interaction for list-based dialogs is to have click-on-an-item dismiss the dialog builder.setPositiveButton(null, null); }