【发布时间】:2012-08-24 12:35:53
【问题描述】:
我使用github.com/bk138/LibSlideMenu中类似的库
它在HTC device(ICS) 和Nexus 7(ICS) 以及其他Gingerbread 设备上运行良好。
但有些设备像Motorola atrix 和另一个HTC 设备。
所以我检查了代码。
View view = act.findViewById(android.R.id.content);
Utils.Log("<SlideMenu> : VIEW : "+view);
ViewParent viewParent = view.getParent();
Utils.Log("<SlideMenu> : VIEW : "+viewParent);
LinearLayout linearLayout = (LinearLayout) viewParent;
Utils.Log("<SlideMenu> : VIEW : "+linearLayout);
content = linearLayout;
在这里,首先在所有设备上返回FrameLayout。
但是第二件事在ICS设备和其他HTC 2.3设备上返回LinearLayout,有些设备返回DecorView。
我参考这篇文章:DecorView Child FrameLayout
他们说我使用NoTitleBar 有问题,所以我显示标题栏但它不起作用。
另外,虽然我添加了NoTitleBar 属性,但有些设备确实工作得很好。
这真的很令人沮丧,因为设备有不同的结果。有人知道吗?
请帮助 :D 提前致谢。
【问题讨论】:
标签: android android-framelayout