android - how to change the background image of Alertdialog -


I have created an alert dylog. Here I am able to change the background image AlertDialog button Now it is possible to touch the background image of the area behind the button..I sent you a screen shot..that is why I want to explain what I want..and the code It is used ..

  AlertDialog.bilder start_views = new alertDialog.bilder (this); TextView start_dialog_title = new text view (this); Start_dialog_title.setText (m_res.getString (R.string.strt_dialog_title)); Start_dialog_title.setBackgroundResource (R.drawable.strt_dlg_tlt_bckgrnd); Start_dialog_title.setGravity (Gravity.CENTER); Start_dialog_title.setTextColor (Color.WHITE); Start_dialog_title.setTextSize (20); TextView start_dialog_desc = new text view (this); Start_dialog_desc.setText (Html.fromHtml (m_res.getString (R.string.strt_dialog_desc))); Start_dialog_desc.setPadding (10, 10, 10, 10); Start_dialog_desc.setbackgroundResource (R.drawable.strt_dlg_desc_bckgrnd); Start_dialog_desc.setGravity (Gravity.CENTER); Start_dialog_desc.setTextColor (Color.WHITE); Start_dialog_desc.setTextSize (15); Start_dialog.setCustomTitle (start_dialog_title); Start_dialog.setview (start_dialog_desc); Start_dialog.setPositiveButton ("OK", New DialogInterface.OnClickListener () {Click Public Zero (DialogInterface dialogue, int id) {dialog.cancel ();}}); AlertDialog Warning = start_dialog.create (); Alert.show (); (Button) alert.findViewById (android.R.id.button1)) setBackgroundResource (R.drawable.settings_but).   

Enter image details here Do not set a positive button Keep your own button in the layout file. / Html>

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -