Hallo Ich habe ein Thema/Stil für einen AlertDialog erstellt. Allerdings habe ich das Problem mit der Buttonleiste, dass es immer noch grau ist, auch nachdem ich die Hintergrundfarbe eingestellt habe. Auch der Button in der Leiste füllt die Leiste nicht wie erwartet. Ich habe mehrere Dinge ausprobiert, aber ich konnte das nicht schaffen.ButtonbarStyle grey Border
<style name="MyBorderlessButton">
<!-- Set background drawable and text size of the buttons here -->
<item name="android:background">@drawable/button_dark_border</item>
<item name="android:textColor">@color/white</item>
</style>
<style name="MyButtonBar" parent="@android:style/ButtonBar">
<!-- Define a background for the button bar and a divider between the buttons here -->
<item name="android:divider">?android:attr/dividerVertical</item>
<item name="android:dividerPadding">1dp</item>
<item name="android:showDividers">middle</item>
<item name="android:padding">3dp</item>
<item name="android:background">@color/transparent</item>
</style>
<style name="MyAlertDialogTitle">
<item name="android:maxLines">1</item>
<item name="android:scrollHorizontally">true</item>
</style>
<style name="MyAlertTextAppearance">
<!-- Set text size and color of title and message here -->
<item name="android:textColor">@color/white</item>
</style>
<style name="MyAlertDialogTheme" parent="android:Theme.Dialog">
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowTitleStyle">@style/MyAlertDialogTitle</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
<item name="android:windowIsFloating">true</item>
<item name="android:textAppearanceMedium">@style/MyAlertTextAppearance</item>
<!--
If you don't want your own button bar style use
@android:style/Holo.Light.ButtonBar.AlertDialog
and
?android:attr/borderlessButtonStyle
instead of @style/MyButtonBar and @style/MyBorderlessButton
-->
<item name="android:buttonBarStyle">@style/MyButtonBar</item>
<item name="android:buttonBarButtonStyle">@style/MyBorderlessButton</item>
</style>
<style name="MyAlertDialogStyle">
<!-- Define background colors of title, message, buttons, etc. here -->
<item name="android:background">@color/drawer_background</item>
</style>
button_dark_border:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/drawer_background" />
<stroke android:width="1dip" android:color="@color/white"/>
</shape>
Wie kann ich die Buttonleiste auch schwarz zu machen und die Taste, um den Alertdialog wieder füllen?