Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
han1202012 committed Jun 23, 2020
1 parent 83568c3 commit d79f3a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/kim/hsl/rtmp/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);

// 删除背景, 该调用必须在 super.onCreate 之后, setContentView 之前
//getWindow().setBackgroundDrawable(null);

// 初始化权限
initPermissions();

Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@
<item name="android:windowBackground">@mipmap/ic_launcher</item>
</style>

<style name="AppTheme.NoBackground" parent="AppTheme">
<!-- 布局渲染时, 不设置主题背景, 避免过度重绘 -->
<item name="android:windowBackground">null</item>
</style>

</resources>

0 comments on commit d79f3a5

Please sign in to comment.