[Android] Reduce overdrawing
Geoffrey Métais
git at videolan.org
Fri Aug 4 15:26:04 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Aug 4 15:20:32 2017 +0200| [c0374bc7d1fb92cfe9d62b563345f06dc0c4cf72] | committer: Geoffrey Métais
Reduce overdrawing
> https://code.videolan.org/videolan/vlc-android/commit/c0374bc7d1fb92cfe9d62b563345f06dc0c4cf72
---
vlc-android/res/layout/audio_albums_songs.xml | 3 +-
vlc-android/res/layout/audio_browser.xml | 3 +-
vlc-android/res/layout/history_list.xml | 42 ++++++++++------------
vlc-android/res/layout/playlist_activity.xml | 6 ++--
.../src/org/videolan/vlc/gui/HistoryFragment.java | 4 +--
5 files changed, 25 insertions(+), 33 deletions(-)
diff --git a/vlc-android/res/layout/audio_albums_songs.xml b/vlc-android/res/layout/audio_albums_songs.xml
index 2ad64d0ee..ec1bb4ea5 100644
--- a/vlc-android/res/layout/audio_albums_songs.xml
+++ b/vlc-android/res/layout/audio_albums_songs.xml
@@ -3,8 +3,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="?attr/background_default_darker" >
+ android:layout_height="fill_parent" >
<include layout="@layout/tab_layout" />
diff --git a/vlc-android/res/layout/audio_browser.xml b/vlc-android/res/layout/audio_browser.xml
index 0eb441ac3..590dd8a1e 100644
--- a/vlc-android/res/layout/audio_browser.xml
+++ b/vlc-android/res/layout/audio_browser.xml
@@ -2,8 +2,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="?attr/background_default_darker">
+ android:layout_height="fill_parent">
<include layout="@layout/tab_layout" />
diff --git a/vlc-android/res/layout/history_list.xml b/vlc-android/res/layout/history_list.xml
index 3b822c9b9..c8b73d95d 100644
--- a/vlc-android/res/layout/history_list.xml
+++ b/vlc-android/res/layout/history_list.xml
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="?attr/background_default_darker" >
+ android:layout_height="match_parent" >
<org.videolan.vlc.gui.view.SwipeRefreshLayout
android:id="@+id/swipeLayout"
@@ -10,31 +9,26 @@
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:background="?attr/background_default">
- <FrameLayout
+ <android.support.v7.widget.RecyclerView
+ android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?attr/background_default">
- <android.support.v7.widget.RecyclerView
- android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:clipToPadding="false"
- android:paddingTop="10dp"
- android:paddingBottom="@dimen/listview_bottom_padding"
- android:paddingLeft="@dimen/listview_side_padding"
- android:paddingRight="@dimen/listview_side_padding" />
-
- <TextView
- android:id="@+id/android:empty"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:paddingTop="30dip"
- android:text="@string/nohistory"
- android:textSize="20sp"
- android:visibility="gone"/>
- </FrameLayout>
+ android:clipToPadding="false"
+ android:paddingTop="10dp"
+ android:paddingBottom="@dimen/listview_bottom_padding"
+ android:paddingLeft="@dimen/listview_side_padding"
+ android:paddingRight="@dimen/listview_side_padding" />
</org.videolan.vlc.gui.view.SwipeRefreshLayout>
+ <TextView
+ android:id="@+id/android:empty"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:paddingTop="30dip"
+ android:text="@string/nohistory"
+ android:textSize="20sp"
+ android:visibility="gone"/>
+
<include layout="@layout/shadow_top"/>
</FrameLayout>
\ No newline at end of file
diff --git a/vlc-android/res/layout/playlist_activity.xml b/vlc-android/res/layout/playlist_activity.xml
index a91e8e58d..26fa8f6c7 100644
--- a/vlc-android/res/layout/playlist_activity.xml
+++ b/vlc-android/res/layout/playlist_activity.xml
@@ -13,8 +13,7 @@
xmlns:vlc="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinator"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="?attr/background_default_darker" >
+ android:layout_height="match_parent" >
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
@@ -66,7 +65,8 @@
android:paddingBottom="@dimen/listview_bottom_padding"
android:paddingLeft="10dp"
android:paddingRight="10dp"
- style="@style/Theme.VLC.List" />
+ style="@style/Theme.VLC.List"
+ android:background="?attr/background_default" />
</FrameLayout>
<android.support.design.widget.FloatingActionButton
diff --git a/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java b/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
index c98324559..19389b783 100644
--- a/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.java
@@ -164,11 +164,11 @@ public class HistoryFragment extends MediaBrowserFragment implements IRefreshabl
private void updateEmptyView() {
if (mHistoryAdapter.isEmpty()){
- mRecyclerView.setVisibility(View.GONE);
+ mSwipeRefreshLayout.setVisibility(View.GONE);
mEmptyView.setVisibility(View.VISIBLE);
} else {
mEmptyView.setVisibility(View.GONE);
- mRecyclerView.setVisibility(View.VISIBLE);
+ mSwipeRefreshLayout.setVisibility(View.VISIBLE);
}
}
More information about the Android
mailing list