android - How can I create my own theme for alertDialog? -
i want create different theme of alertdialog instances. need own title view instead of usual black title background. text should have blue color, , set edge of alertdialog round shape.
is possible create our own theme alert dialogs, using style or creating class extends alertdialog.builder
? need common theme or style instances of alertdialog. using alertdialog in many places - 1 singlechoice items, 1 arrayadapter.
my alertdialog array adapter:
string[] items = {"edit profile","change user","change password","logout"}; arrayadapter<string> adapter = new arrayadapter<string>(loged.this, r.layout.my_spinner_layout, items); settingmenu.setadapter(adapter, listener);
my alertdialog single choice items:
alertdelete = new alertdialog.builder(getparent()); alertdelete.settitle("delete"); alertdelete.setcancelable(true); charsequence[] choice = {"this user","all user"}; alertdelete.setsinglechoiceitems(choice, 0,
for alertdialog, need common theme, like:
please check link. here creating own alertdialog class , simple method if reuse alertdialog in many situation in application
Comments
Post a Comment