安卓Launcher无法响应HOME键记录

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

直接步入正题我写了一个launcher在里面点击了一个应用发现按下home键无法回到当前launcher后来我发现是因为android:theme="@style/AppTheme"里面的windowIsTranslucent

<style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">

<!-- Customize your theme here. -->

<item name="colorPrimary">@color/colorPrimary</item>

<item name="colorPrimaryDark">@color/colorPrimaryDark</item>

<item name="colorAccent">@color/colorAccent</item>

<item name="android:windowIsTranslucent">true</item>

</style>

windowIsTranslucent这个属性你们可以自行百度我把true写成false以后就正常了

<style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">

<!-- Customize your theme here. -->

<item name="colorPrimary">@color/colorPrimary</item>

<item name="colorPrimaryDark">@color/colorPrimaryDark</item>

<item name="colorAccent">@color/colorAccent</item>

<item name="android:windowIsTranslucent">false</item>

</style>

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
标签: android