How to create a fully customized Alert Dialog?

一世执手 提交于 2019-12-04 20:43:21

Here is one way (if you don't like this particular example with the green border, scroll below to see a second one I found).

Here is another example (this one gives you an example without a border, and one with a border. The explanations are in Japanese, but the code is given for both.)

Hi if you use your own layout then set this in your styles.xml

<style name="Theme.Transparent_layout" parent="android:style/Theme.Dialog">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>

</style>

and set this style in your manifest file

<activity android:name=".Main" android:theme="@style/Theme.Transparent_layout" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!