Android 为什么自定义启动器不';有时你不能正常工作吗?
我创建了一个自定义启动器,并将其设置为平板电脑的默认启动器。但是,当我打开一个应用程序,然后按下后退按钮,我将转到最后一个启动器(三星的默认启动器),尽管我以前将我的启动器设置为默认 这是我的启动程序清单:Android 为什么自定义启动器不';有时你不能正常工作吗?,android,android-manifest,android-launcher,Android,Android Manifest,Android Launcher,我创建了一个自定义启动器,并将其设置为平板电脑的默认启动器。但是,当我打开一个应用程序,然后按下后退按钮,我将转到最后一个启动器(三星的默认启动器),尽管我以前将我的启动器设置为默认 这是我的启动程序清单: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="launcher.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="launcher.base.app.ehsan.com.minelauncher">
<!-- To access internet -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- To auto-complete the email text field in the login form with the JSON's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.READ_PROFILE"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<application
android:name=".tools.G"
android:allowBackup="true"
android:icon="@mipmap/logo"
android:label="@string/app_name"
android:supportsRtl="false"
android:theme="@style/AppTheme">
<activity android:name=".activity.MainActivity">
</activity>
<activity
android:name=".activity.LoginActivity"
android:label="@string/title_activity_login"
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:stateNotNeeded="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".activity.ForgetActivity"
android:screenOrientation="sensorLandscape"
>
</activity>
<activity
android:name=".activity.RecoveryActivity"
android:screenOrientation="sensorLandscape"
>
</activity>
<service
android:name=".APIService.InternetService"
android:enabled="true"
android:exported="true"/>
</application>
</manifest>
谢谢你的回答。试试:
@Override public void onBackPressed(){}
我在我的启动程序中使用了这个。但问题是,当用户从我的启动程序打开一个应用程序并按下后退按钮时,我的启动程序将退出!不要在重写的方法中调用super(),否则它将关闭启动器活动。请尝试:@Override public void onBackPressed(){}
我在启动器中使用了它。但问题是,当用户从我的启动程序打开一个应用程序并按下后退按钮时,我的启动程序将退出!不要在重写的方法中调用super(),否则它将关闭启动器活动。