From f45769cbb226046c701425b419be0332898ed928 Mon Sep 17 00:00:00 2001 From: "Andrei.Rosca" Date: Sat, 5 May 2018 10:26:35 +0200 Subject: [PATCH] Reduce overdraw --- .../main/java/org/schabi/newpipe/player/MainVideoPlayer.java | 2 ++ app/src/main/res/layout/activity_main_player.xml | 1 - app/src/main/res/layout/dialog_playlists.xml | 1 - app/src/main/res/layout/fragment_channel.xml | 1 - app/src/main/res/layout/fragment_kiosk.xml | 1 - app/src/main/res/layout/fragment_playlist.xml | 1 - app/src/main/res/layout/fragment_video_detail.xml | 3 +-- 7 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index bc4a3f71d..502e5b802 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -25,6 +25,7 @@ import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.Color; +import android.graphics.drawable.ColorDrawable; import android.media.AudioManager; import android.os.Build; import android.os.Bundle; @@ -114,6 +115,7 @@ public final class MainVideoPlayer extends AppCompatActivity if (DEBUG) Log.d(TAG, "onCreate() called with: savedInstanceState = [" + savedInstanceState + "]"); defaultPreferences = PreferenceManager.getDefaultSharedPreferences(this); ThemeHelper.setTheme(this); + getWindow().setBackgroundDrawable(new ColorDrawable(Color.BLACK)); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) getWindow().setStatusBarColor(Color.BLACK); setVolumeControlStream(AudioManager.STREAM_MUSIC); diff --git a/app/src/main/res/layout/activity_main_player.xml b/app/src/main/res/layout/activity_main_player.xml index 616f93536..f2cf85802 100644 --- a/app/src/main/res/layout/activity_main_player.xml +++ b/app/src/main/res/layout/activity_main_player.xml @@ -5,7 +5,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" - android:background="@android:color/black" android:gravity="center"> diff --git a/app/src/main/res/layout/fragment_kiosk.xml b/app/src/main/res/layout/fragment_kiosk.xml index 4730e66c8..73f85bf01 100644 --- a/app/src/main/res/layout/fragment_kiosk.xml +++ b/app/src/main/res/layout/fragment_kiosk.xml @@ -9,7 +9,6 @@ android:id="@+id/items_list" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?android:windowBackground" android:scrollbars="vertical" tools:listitem="@layout/list_stream_item"/> diff --git a/app/src/main/res/layout/fragment_playlist.xml b/app/src/main/res/layout/fragment_playlist.xml index 37c609fa4..88a458935 100644 --- a/app/src/main/res/layout/fragment_playlist.xml +++ b/app/src/main/res/layout/fragment_playlist.xml @@ -9,7 +9,6 @@ android:id="@+id/items_list" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?android:windowBackground" android:scrollbars="vertical" tools:listitem="@layout/list_stream_mini_item"/> diff --git a/app/src/main/res/layout/fragment_video_detail.xml b/app/src/main/res/layout/fragment_video_detail.xml index 7c6568b67..2b1f94c4a 100644 --- a/app/src/main/res/layout/fragment_video_detail.xml +++ b/app/src/main/res/layout/fragment_video_detail.xml @@ -101,8 +101,7 @@ + android:layout_height="match_parent">