简体   繁体   English

Android UI 在电视上 - 看起来很糟糕

[英]Android UI onto TV - Looks Terrible

hoping someone can guide me here希望有人可以在这里指导我

I've got an app that looks nice on the phone, but we need to be able to connect and mirror the phone to a TV.我有一个在手机上看起来不错的应用程序,但我们需要能够将手机连接并镜像到电视。 I have the adapters and cables and I can hook the phone to the TV and all of that part works.我有适配器和电缆,我可以将手机连接到电视上,所有这些都可以正常工作。

but when the app launches on the TV - the UI looks TERRIBLE但是当应用程序在电视上启动时 - 用户界面看起来很糟糕

the images are stretched or missing the text is stretched too tall图像被拉伸或丢失 文本被拉伸得太高

the TV is 1920 x 1080 - just like the phone - but obviously less dense电视是 1920 x 1080 - 就像手机一样 - 但显然密度较低

And I can't figure out what I need to do to get this UI to look correct on the TV而且我不知道我需要做什么才能让这个 UI 在电视上看起来正确

Can anyone point me in the right direction?谁能指出我正确的方向?

Thanks!!谢谢!!

Have you created a layout variation for TVs?您是否为电视创建了布局变化?

  1. Click on the "Orientation for Preview" button in the layout editor (number 2 in this bar)单击布局编辑器中的“预览方向”按钮(此栏中的数字 2)

  2. Click "Create Other..."点击“创建其他...”

  3. Select "UI Mode" as a qualifier, then select "Television" in the dropdown Select "UI Mode" 作为限定符,然后 select "Television" 在下拉列表中

  4. Design your layout.设计你的布局。 You may need to change the "Device for Preview" (number 3 in the bar) to a TV您可能需要将“预览设备”(栏中的数字 3)更改为电视

Your layout folder will look like this , and your app should automatically use the television layout when it's on the TV您的布局文件夹将如下所示,并且您的应用应在电视上自动使用电视布局

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM