diff options
Diffstat (limited to 'src/github/daneren2005/dsub/fragments/SelectArtistFragment.java')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectArtistFragment.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java b/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java index a06adca2..d0ea96b3 100644 --- a/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java +++ b/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java @@ -14,6 +14,7 @@ import android.view.ViewGroup; import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
+import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import github.daneren2005.dsub.R;
@@ -205,6 +206,26 @@ public class SelectArtistFragment extends SelectListFragment<Artist> { }
}
+ @Override
+ public void setEmpty(boolean empty) {
+ super.setEmpty(empty);
+
+ if(empty && !Util.isOffline(context)) {
+ createMusicFolderButton();
+ setMusicFolders();
+
+ objects.clear();
+ listView.setAdapter(new ArtistAdapter(context, objects));
+ listView.setVisibility(View.VISIBLE);
+
+ View view = rootView.findViewById(R.id.tab_progress);
+ LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) view.getLayoutParams();
+ params.height = 0;
+ params.weight = 5;
+ view.setLayoutParams(params);
+ }
+ }
+
private void setMusicFolders() {
// Display selected music folder
if (musicFolders != null) {
|