为什么我无法在摩托罗拉Atrix仿真器中看到正确的自定义对话框? [英] Why I am not able to see proper custom dialog Box in Motorola Atrix Emulator?
问题描述
我已经为我的应用程序创建了自定义对话框。
当我在正常的三星Galary Ace中运行该应用程序时,它在该设备中显示正确,但是当我要在摩托罗拉Atrix中运行该应用程序时,自定义对话框在边框上看不到正确。 。 。
请使用我的自定义对话框查看摩托罗拉Atrix仿真器的图像。
I have created Custom Dialog for my application. While i run that application in normal Samsung Galary Ace then it shows proper in that device but while i am going to run that app in Motorola Atrix then the Custom Dialog Box not seen proper with the border. . . Please see the Image of Motorola Atrix Emulator with my Custom Dialog in it.
应该我必须删除自定义对话框的边框,或者我还需要做什么才能在任何设备中看到我的自定义对话框?
如果我必须从自定义对话框中删除边框,那么让我知道如何?
Should i have to remove the border of the custom dialog or what else i have to do to see only my custom dialog in any device ? If i have to remove the border from the custom dialog then let me know how ??
谢谢。
推荐答案
我知道这已经被回答了,但这里是怎么做的...
I know this has been answered but here is how I did it...
我的摩托罗拉手机X2,Razr ...似乎肯定是摩托罗拉风格的错误。
I saw this on all my Motorola phones X2, Razr...Seems to definitely be a bug in the styles for Motorola.
我通过创建自己的样式并从我的\android-sdk\platforms\android-10\data\res\drawable中复制panel_background来修复-hdpi,并把它放在我的画。如果我使用@android:drawable / panel_background引用了Eclipse,则不会编译。
I fixed it by creating my own style and copying panel_background from my \android-sdk\platforms\android-10\data\res\drawable-hdpi and placing it in my drawable. Eclipse wouldn't compile if I referenced it using @android:drawable/panel_background.
styles.xml
styles.xml
<style name="Theme.CustomDialog" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@drawable/panel_background</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
</style>
然后只需调用添加了主题参数的对话框
Then just call the dialog with the Theme parameter added
Dialog dialog = new Dialog(this, R.style.Theme_CustomDialog);
固定摩托罗拉问题!
这篇关于为什么我无法在摩托罗拉Atrix仿真器中看到正确的自定义对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!