开发者

Different layouts on Google TV?

I'm converting a app made for Honeycomb tablets into a Google TV app. My main layout is called main.xml. It's in the layout folder. I created a new folder layout-notouch with a new main.xml to display when the app is run on Google TV. But when I run my app (on the Google TV Android SDK Addon) he is still using the main.xml from the normal layout folder and not from the layout-notouch. What am I doing wrong here?


Update: I figured out that the layout-notouch is not working. When I play the file in layout-large, it work开发者_高级运维ing. But this is not what I want. Should I send a bug report to Google about this?


Update: I entered a bugreport into the Android Project on Google Code. You can find it at https://code.google.com/p/android/issues/detail?id=20087


We are suggesting that your resource qualifiers be layout-tvdpi-notouch (720) & layout-xhdpi-notouch (1080)

layout-large-notouch should also work.


According to someone else at Google, there is a television resource selector, which was introduced with Android 3.2: https://plus.google.com/u/0/108284392618554783657/posts/Lf5g8nqw6s4

The documentation still hasn't been updated, but presumably this is the corresponding constant in Configuration: https://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_TELEVISION

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜