Recently I used it for my implementation, so here is my code.
You can do that by creating a new style in the styles.xml file:
<style name="question_dialog" parent="@android:style/Theme.Holo.Dialog">
<item name="android:windowTitleStyle">@style/question_dialog_title</item>
</style>
<style name="question_dialog_title" parent="android:Widget.TextView">
<item name="android:background">#5cc5cc</item>
<item name="android:textSize">21sp</item>
<item name="android:textColor">#ffffff</item>
</style>
and then, when you create your Dialog object, you wanna use this constructor:
answeringDialog = new Dialog(this, R.style.question_dialog);
the output is:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.