[英]Android Studio - Can't find app icon on TV homescreen
當我在電視上使用文件資源管理器安裝我的應用程序時,我可以運行它和所有內容,但我不知道如何創建一個位於電視主屏幕上的圖標
這是我的 AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sony.omgandroid" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity
android:name=".FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
它在application
標簽上使用AndroidManifest
的android:banner
。
<application
android:name=".ExampleApp"
android:banner="@drawable/app_banner"
android:theme="@style/AppTheme"
您需要在AndroidManifest.xml
文件中添加
android:banner
android:icon
android:logo
和android.intent.category.LEANBACK_LAUNCHER
例子:
<activity
...
android:banner="@mipmap/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:logo="@mipmap/ic_launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<category android:name="android.intent.category.LAUNCHER" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.