[英]Android Studio - Can't find app icon on TV homescreen
When I install my app using a file explorer on my tv, I can run it and everything but I do not know how to create an icon that will sit on the home screen of the tv当我在电视上使用文件资源管理器安装我的应用程序时,我可以运行它和所有内容,但我不知道如何创建一个位于电视主屏幕上的图标
Here is my AndroidManifest:这是我的 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>
It utilizes the android:banner
in the AndroidManifest
on the application
tag.它在
application
标签上使用AndroidManifest
的android:banner
。
<application
android:name=".ExampleApp"
android:banner="@drawable/app_banner"
android:theme="@style/AppTheme"
You need add in AndroidManifest.xml
file您需要在
AndroidManifest.xml
文件中添加
android:banner
android:icon
android:logo
and android.intent.category.LEANBACK_LAUNCHER
android:banner
android:icon
android:logo
和android.intent.category.LEANBACK_LAUNCHER
example:例子:
<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.