From ef727be89ef69f044efec9993f21c4ddac069bab Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 30 Aug 2016 17:12:55 -0700 Subject: Fixes #731: Work around for RecyclerView constantly loading entire adapter instead of just what was visible in landscape --- .../daneren2005/dsub/view/MyViewFlipper.java | 53 ----- app/src/main/res/layout-land/download.xml | 248 ++++++++++----------- app/src/main/res/layout-large-land/download.xml | 236 +++++++++----------- app/src/main/res/layout-port/download.xml | 4 +- 4 files changed, 231 insertions(+), 310 deletions(-) delete mode 100644 app/src/main/java/github/daneren2005/dsub/view/MyViewFlipper.java (limited to 'app') diff --git a/app/src/main/java/github/daneren2005/dsub/view/MyViewFlipper.java b/app/src/main/java/github/daneren2005/dsub/view/MyViewFlipper.java deleted file mode 100644 index 26a3de08..00000000 --- a/app/src/main/java/github/daneren2005/dsub/view/MyViewFlipper.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - This file is part of Subsonic. - - Subsonic is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Subsonic is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Subsonic. If not, see . - - Copyright 2009 (C) Sindre Mehus - */ -package github.daneren2005.dsub.view; - -import android.content.Context; -import android.util.AttributeSet; -import android.widget.ViewFlipper; - -/** - * Work-around for Android Issue 6191 (http://code.google.com/p/android/issues/detail?id=6191) - * - * @author Sindre Mehus - * @version $Id$ - */ -public class MyViewFlipper extends ViewFlipper { - - public MyViewFlipper(Context context) { - super(context); - } - - public MyViewFlipper(Context context, AttributeSet attrs) { - super(context, attrs); - } - - - @Override - protected void onDetachedFromWindow() { - try { - super.onDetachedFromWindow(); - } - catch (IllegalArgumentException e) { - // Call stopFlipping() in order to kick off updateRunning() - stopFlipping(); - } - } -} - diff --git a/app/src/main/res/layout-land/download.xml b/app/src/main/res/layout-land/download.xml index 1bae4ae2..894ae62e 100644 --- a/app/src/main/res/layout-land/download.xml +++ b/app/src/main/res/layout-land/download.xml @@ -1,134 +1,122 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_height="wrap_content" + android:layout_alignParentBottom="true"> + - - + + + + diff --git a/app/src/main/res/layout-large-land/download.xml b/app/src/main/res/layout-large-land/download.xml index 339a02a9..cf5ef571 100644 --- a/app/src/main/res/layout-large-land/download.xml +++ b/app/src/main/res/layout-large-land/download.xml @@ -1,135 +1,121 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + - + + + + + + + + + + + + + + + + - - + + diff --git a/app/src/main/res/layout-port/download.xml b/app/src/main/res/layout-port/download.xml index 81f4e8dc..39b5e5e9 100644 --- a/app/src/main/res/layout-port/download.xml +++ b/app/src/main/res/layout-port/download.xml @@ -10,7 +10,7 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> - - + -- cgit v1.2.3