diff options
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) {
|