diff options
author | Scott Jackson <daneren2005@gmail.com> | 2012-09-13 21:03:46 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2012-09-13 21:03:46 -0700 |
commit | 75a688847ca797905106d95bf6f41660c6ed650b (patch) | |
tree | f665280acee98458fc12a7a775d45ac050959ace /subsonic-android/src | |
parent | 43fa07540dc58a871956cc4d1af410f80299b554 (diff) | |
download | dsub-75a688847ca797905106d95bf6f41660c6ed650b.tar.gz dsub-75a688847ca797905106d95bf6f41660c6ed650b.tar.bz2 dsub-75a688847ca797905106d95bf6f41660c6ed650b.zip |
Some more actionbar menu item changes
Diffstat (limited to 'subsonic-android/src')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java index 3e0c496a..abbfe67b 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java @@ -56,6 +56,7 @@ public class SelectAlbumActivity extends SubsonicTabActivity { private ListView entryList; private View footer; private View emptyView; + private com.actionbarsherlock.view.MenuItem selectAll; private Button playLastButton; private Button pinButton; private Button unpinButton; @@ -155,6 +156,7 @@ public class SelectAlbumActivity extends SubsonicTabActivity { public boolean onCreateOptionsMenu(Menu menu) { com.actionbarsherlock.view.MenuInflater inflater = getSupportMenuInflater(); inflater.inflate(R.menu.select_album, menu); + selectAll = menu.findItem(R.id.menu_select); return true; } @@ -503,23 +505,23 @@ public class SelectAlbumActivity extends SubsonicTabActivity { builder.setMessage(R.string.select_album_donate_dialog_message); builder.setPositiveButton(R.string.select_album_donate_dialog_now, - new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(Constants.DONATION_URL))); - } - }); + new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(Constants.DONATION_URL))); + } + }); builder.setNegativeButton(R.string.select_album_donate_dialog_later, - new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - dialogInterface.dismiss(); - if (onValid != null) { - onValid.run(); - } - } - }); + new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialogInterface, int i) { + dialogInterface.dismiss(); + if (onValid != null) { + onValid.run(); + } + } + }); builder.create().show(); } @@ -558,7 +560,9 @@ public class SelectAlbumActivity extends SubsonicTabActivity { pinButton.setVisibility(View.VISIBLE); unpinButton.setVisibility(View.VISIBLE); deleteButton.setVisibility(View.VISIBLE); - } + } else { + selectAll.setVisible(false); + } emptyView.setVisibility(entries.isEmpty() ? View.VISIBLE : View.GONE); entryList.setAdapter(new EntryAdapter(SelectAlbumActivity.this, getImageLoader(), entries, true)); |