【发布时间】:2019-12-16 08:30:51
【问题描述】:
当我在电视上安装我的应用程序时,我可以运行它并执行所有操作,但我不知道为什么应用程序图标没有显示在电视的主屏幕上。主要是它没有在 1080p 电视中显示
这是我的 AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.demo.tv">
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<permission
android:name="com.app.demo.tv.ACCESS_VIDEO_DATA"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".Application"
android:allowBackup="true"
android:banner="@drawable/app_icon"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".HomeActivity"
android:label="@string/app_name"
android:theme="@style/HomeTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/LandingAndOtherTheme" />
</application>
</manifest>
【问题讨论】:
-
你能发布 AppTheme 吗?
-
@NguyễnTrungHiếu
-
你能分享大小 app_icon 吗?注意:横幅应为 xhdpi 资源,大小为 320 x 180 像素
-
是的,横幅尺寸为 320 x 180 像素,PNG 格式,位于 xhdpi 文件夹中
标签: android launcher television leanback