aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-05-04 20:31:57 -0700
committerScott Jackson <daneren2005@gmail.com>2013-05-04 20:31:57 -0700
commita5a195f12dc018020679f1514481a46a344463f0 (patch)
tree216d250d43f4e8e6d9886abab392cdcf6683190d /subsonic-android
parentdb6be0ef0c9141eb6eebeb9b5ccdc00c13868c54 (diff)
downloaddsub-a5a195f12dc018020679f1514481a46a344463f0.tar.gz
dsub-a5a195f12dc018020679f1514481a46a344463f0.tar.bz2
dsub-a5a195f12dc018020679f1514481a46a344463f0.zip
Fix folder picker showing in offline mode
Diffstat (limited to 'subsonic-android')
-rw-r--r--subsonic-android/res/layout/select_artist.xml1
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java11
2 files changed, 7 insertions, 5 deletions
diff --git a/subsonic-android/res/layout/select_artist.xml b/subsonic-android/res/layout/select_artist.xml
index fef51d3c..b1e64e17 100644
--- a/subsonic-android/res/layout/select_artist.xml
+++ b/subsonic-android/res/layout/select_artist.xml
@@ -10,6 +10,7 @@
android:layout_height="1px"
android:background="@color/dividerColor"/>
+ <include layout="@layout/select_artist_header"/>
<include layout="@layout/tab_progress"/>
<ListView android:id="@+id/select_artist_list"
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
index 95452eb6..bf4b80f8 100644
--- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
+++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
@@ -51,13 +51,9 @@ public class SelectArtistFragment extends SubsonicFragment implements AdapterVie
artistList = (ListView) rootView.findViewById(R.id.select_artist_list);
artistList.setOnItemClickListener(this);
- folderButton = inflater.inflate(R.layout.select_artist_header, artistList, false);
+ folderButton = rootView.findViewById(R.id.select_artist_folder);
folderName = (TextView) folderButton.findViewById(R.id.select_artist_folder_2);
- if (!Util.isOffline(context)) {
- artistList.addHeaderView(folderButton);
- }
-
registerForContextMenu(artistList);
invalidated = true;
@@ -152,6 +148,11 @@ public class SelectArtistFragment extends SubsonicFragment implements AdapterVie
}
private void load(final boolean refresh) {
+ if (Util.isOffline(context)) {
+ folderButton.setVisibility(View.GONE);
+ } else {
+ folderButton.setVisibility(View.VISIBLE);
+ }
artistList.setVisibility(View.INVISIBLE);
BackgroundTask<Indexes> task = new TabBackgroundTask<Indexes>(this) {