将 android 活动定义为带有浅色主题的对话框 [英] Defining android activity as dialog with light theme

查看:15
本文介绍了将 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 活动定义为带有浅色主题的对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆