本文介紹了將 android 活動定義為帶有淺色主題的對話框的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
在我的應用程序中,我將一個 android 活動定義為對話框.它看起來很合適.唯一的問題是我的對話框出現在深色主題中.我想將它顯示為淺色主題.我以下列方式定義了我的活動對話框:
In my application I am defining one android activity as dialog.It looks proper.Only problem with that is my dialog appear in dark theme. I want to display it into light theme. I defined my activity dialog in following manner :
<activity
android:theme="@android:style/Theme.DeviceDefault.Dialog.MinWidth"
android:name="com.example.dialog"
android:label="@string/title_activity_list"
>
</activity>
如何做到這一點.任何解決方案.需要幫忙.謝謝.
How to do this. Any solution. Need Help. Thank you.
推薦答案
你需要使用 Holo Light Dialog 主題:
You need to use Holo Light Dialog theme:
<activity
android:theme="@android:style/Theme.Holo.Light.Dialog"
android:name="com.example.dialog"
android:label="@string/title_activity_list" />
這篇關于將 android 活動定義為帶有淺色主題的對話框的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!