活动如使用HoloEverywhere对话框切断布局 [英] Activity as dialog using HoloEverywhere cuts off layout
问题描述
我用我的Android应用程序的HoloEverywhere库,以确保在所有支持的设备上一致的主题。但是,我快到麻烦,利用Holo.Theme.Dialog活动:在我的Android 2.2模拟器它显示正常,但在我的Android 4.0设备(其中有实际的Holo主题可用)布局切断项目右侧该对话框的边缘。
I'm using the HoloEverywhere library in my Android app to ensure a consistent theme across all supported devices. However, I'm running into trouble with activities that utilize Holo.Theme.Dialog: on my Android 2.2 emulator it displays correctly, but on my Android 4 device (which has the actual Holo theme available) the layout cuts off items on the right edge of the dialog.
我的问题是,我怎么可以强制有库存的Holo主题,用这个来代替HoleEverywhere设备?或者,我怎么能修改HoloEverywhere使在Android 4+设备正确地称呼为对话框显示活动
My question is, how can I force devices that have the stock Holo theme to use that instead of HoleEverywhere? Or, how can I modify HoloEverywhere to make activities styled as dialogs display correctly on Android 4+ devices?
截图:
推荐答案
我不知道这是否错误已被固定在HoloEverywhere或没有,但我的解决办法是改变我所有的对话活动课,以AlertDialogs。这需要一些code的变化,但现在我可以肯定我的对话框的外观和行为预期。
I'm not sure if this bug has been fixed in HoloEverywhere or not, but my solution was to change all of my dialog activity classes to AlertDialogs. This required some code changes, but now I can be sure my dialogs will look and act as expected.
这篇关于活动如使用HoloEverywhere对话框切断布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!