在AppCompat中使用基于材质的对话框主题 [英] Using a Material-based Dialog Theme with AppCompat

查看:113
本文介绍了在AppCompat中使用基于材质的对话框主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的清单中有一个活动,该活动以前是用Dialog Theme设置样式的.我无法在AppCompat库中找到替换它的方法.

I have an activity in my Manifest I used to style with a Dialog Theme. I can not find how to replace this in AppCompat library.

  <activity
            android:name=".LoginActivity"
            android:theme="@android:styles/Theme.Holo.Dialog" 
            android:configChanges="orientation|screenSize|keyboardHidden"
            android:label="Login" >

是否存在基于材料的等同物?

Is there a Material-based equivalent?

推荐答案

AppCompat中尚无基于材质的对话框主题,请参见

There is no material based theme for a dialog in AppCompat yet, see here

Will appcompat automatically theme dialogs to look like the Lollipop version?

响应

Not yet, but it's on the todo list.

更新:

Support Library的版本22.1中,您现在可以使用 AppCompatDialog

In version 22.1 of the Support Library you can now get the material dialog style by using AppCompatDialog

这篇关于在AppCompat中使用基于材质的对话框主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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