Android. Double background AlertDialog -
Android. Double background AlertDialog -
everybody! forgive, badly know english...
i have 1 problem. alertdialog have double background. look:
http://screenshotuploader.com/s/1406rn7lr
the external background - made me. internal background - don't know clean. have 2 options:
to clean internal background or clean external background, alter internalpublic dialog oncreatedialog(bundle savedinstancestate) {
alertdialog.builder builder = new alertdialog.builder(new contextthemewrapper(getactivity(), r.style.apptheme)); //alertdialog.builder builder = new alertdialog.builder(getactivity()); layoutinflater inflater = getactivity().getlayoutinflater(); view view = inflater.inflate(r.layout.test_dialog, null); builder.setview(view); dialog dialog = builder.create(); dialog.getwindow().setbackgrounddrawableresource(r.drawable.alert_dialog_full_dark); homecoming dialog; }
this code builds dialod xml:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="10dp" > <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:text="text in dialog" style="@style/big_text" /> <edittext android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="edit" style="@style/edittextstyle" /> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="button" android:layout_gravity="center_horizontal" style="@style/buttonstyle" /> </linearlayout> help me, please. thanks!
yes!!! found answer! change background of progressdialog
style api9 (maybe api8... i'm don't know):
<style name="apptheme" parent="appbasetheme"> <item name="android:alertdialogstyle">@style/customalertdialogstyle</item> </style> <style name="customalertdialogstyle" parent="@android:style/theme.dialog"> <item name="android:fulldark">@drawable/alert_dialog_full_dark</item> <item name="android:fullbright">@drawable/alert_dialog_full_dark</item> <item name="android:topdark">@drawable/alert_dialog_top_dark</item> <item name="android:topbright">@drawable/alert_dialog_top_dark</item> <item name="android:centerdark">@drawable/alert_dialog_center_dark</item> <item name="android:centerbright">@drawable/alert_dialog_center_dark</item> <item name="android:centermedium">@drawable/alert_dialog_center_dark</item> <item name="android:bottomdark">@drawable/alert_dialog_bottom_dark</item> <item name="android:bottombright">@drawable/alert_dialog_bottom_dark</item> <item name="android:bottommedium">@drawable/alert_dialog_bottom_dark</item> </style> style api11 , more:
<style name="apptheme" parent="@style/theme.appcompat"> <item name="android:alertdialogtheme">@style/apptheme.alertdialogtheme11</item> </style> <style name="apptheme.alertdialogtheme11" parent="@android:style/theme.dialog"> <item name="android:windowframe">@null</item> <item name="android:windowtitlestyle">@null</item> <item name="android:windowbackground">@color/transparent</item> <item name="android:background">@color/transparent</item> <item name="android:windowisfloating">true</item> <item name="android:windowcontentoverlay">@null</item> <item name="android:windowanimationstyle">@android:style/animation.dialog</item> <item name="android:windowsoftinputmode">stateunspecified|adjustpan</item> <item name="android:windowcloseontouchoutside">true</item> <item name="android:windowactionmodeoverlay">true</item> <item name="android:colorbackgroundcachehint">@null</item> <item name="android:windowminwidthmajor">@dimen/dialog_min_width_major</item> <item name="android:windowminwidthminor">@dimen/dialog_min_width_minor</item> <item name="android:alertdialogstyle">@style/apptheme.alertdialogtheme11.alertdialogstyle11</item> </style> <style name="apptheme.alertdialogtheme11.alertdialogstyle11"> <item name="android:fulldark">@drawable/alert_dialog_full_dark</item> <item name="android:fullbright">@drawable/alert_dialog_full_dark</item> <item name="android:topdark">@drawable/alert_dialog_top_dark</item> <item name="android:topbright">@drawable/alert_dialog_top_dark</item> <item name="android:centerdark">@drawable/alert_dialog_center_dark</item> <item name="android:centerbright">@drawable/alert_dialog_center_dark</item> <item name="android:centermedium">@drawable/alert_dialog_center_dark</item> <item name="android:bottomdark">@drawable/alert_dialog_bottom_dark</item> <item name="android:bottombright">@drawable/alert_dialog_bottom_dark</item> <item name="android:bottommedium">@drawable/alert_dialog_bottom_dark</item> </style> it necessary find style of bottom bar (button) , color of points of list in dialogue
android background alertdialog
Comments
Post a Comment