Dialog on Android KitKat seems to be cut(Android KitKat 上的对话框似乎被剪掉了)
问题描述
我为 Activity 使用了对话框主题,它在 Android <= 4.3 上运行良好,但在最新的 KitKat 4.4 上运行良好.这是问题的截图:
I used dialog theme for an Activity and it works fine on Android <= 4.3 but not on the latest KitKat 4.4. Here's a screenshot of the problem:
缺少布局顶部.您可以看到边界似乎被切断了.
Top of the layout is missing. You can see that the bounds seems to be cut.
我是用安卓模拟器测试app,所以不知道是虚拟机问题还是其他原因.
I'm using an Android emulator to test the app, so I don't know if the problem is due to the virtual machine or due to some other reason.
推荐答案
你可以从下面的代码中解决要剪切的问题.
You can solve the problem to be cut from below code.
dialog.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
这篇关于Android KitKat 上的对话框似乎被剪掉了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android KitKat 上的对话框似乎被剪掉了
基础教程推荐
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
