自定义style 继承Theme.Translucent.NoTitleBar  

 
 
  <style name="My.Translucent" parent="   @android :style/Theme.Translucent.NoTitleBar"> 
          <item name="android:windowBackground">   @android :color/transparent</item> 
          <item name="android:colorBackgroundCacheHint">   @android :color/transparent</item> 
          <item name="android:windowIsTranslucent">false</item> 
          <item name="android:windowAnimationStyle">   @android :style/Animation</item> 
      </style>
 
在配置文件中给activity设置这个theme,可以解决有时候会突然看到桌面的问题。

相关文章:

  • 2021-12-31
  • 2021-06-08
  • 2022-01-19
  • 2021-04-08
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2021-12-31
  • 2022-03-08
  • 2021-04-20
  • 2022-01-01
相关资源
相似解决方案