I have an xml that declare the button background:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@color/selector_pressed" />
<item android:state_focused="true" android:drawable="@color/selector_focused" />
<item android:drawable="@android:color/transparent" />
</selector>
在我的手机三星Nexus S(安卓4.0.3),这个XML很好地工作,当我preSS视图的背景颜色的变化。 但我得到了在平板电脑上的问题(三星Galaxy Tab的Android 3.2),单击该按钮,但我看不到的的backgroung任何更改。背景颜色不会改变的平板电脑。
On my phone Samsung Nexus S (android 4.0.3) , this xml work perfectly, when i press the view the background color change. But I got a problem on tablets (Samsung Galaxy tab, Android 3.2), the button is clicked but i don't see any changes for the backgroung. The background color never change for tablets.
任何一个有一个想法,为什么这只是发生的针对平板电脑?我怎样才能解决这个问题?
Any one have an idea why this happening only for tablets? and how can i fix this?
推荐答案
我有同样的问题,但我已经设法解决这个问题: 实际的问题就出在一个缺陷的Android 3.2就硬件加速,所以如果你把你的AndroidManifest您的应用程序hardwareAccelerated =真正的你的问题将得到解决。
I've had the same problem but I've managed to solve this: the actual problem lies in a defect in android 3.2 regarding hardware acceleration so if you put in your AndroidManifest that your application is hardwareAccelerated="true" your problem will be solved.
相关推荐
最新文章