diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-05-04 20:31:57 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-05-04 20:31:57 -0700 |
commit | a5a195f12dc018020679f1514481a46a344463f0 (patch) | |
tree | 216d250d43f4e8e6d9886abab392cdcf6683190d /subsonic-android | |
parent | db6be0ef0c9141eb6eebeb9b5ccdc00c13868c54 (diff) | |
download | dsub-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.xml | 1 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java | 11 |
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) {
|