Custom dialog hasn't divider under the title
-
28-10-2019 - |
Question
At the official documentation there is an article of how to create custom dialogs. And there is also a picture of result dialog which have gradient border under it's title.
When I copy this code to run it on my machine and look at the results I get the dialog without gradient divider between the dialog's title and it's content:
Is this normal behavior and if it is, tell me how can I add divider by myself through the code, or using styles mechanism?
Solution
Yes this is a normal behavior for custom dialog. To have the divider below title use something like:
<View
android:layout_width="fill_parent"
android:layout_height="0.03dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="5dip"
android:layout_marginBottom="5dip"
android:background="#404040" />
in your custom layout above the layout in which you have the imageview and textview.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow