aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/res/layout/select_album.xml48
-rw-r--r--subsonic-android/res/layout/select_album_footer.xml27
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java13
3 files changed, 49 insertions, 39 deletions
diff --git a/subsonic-android/res/layout/select_album.xml b/subsonic-android/res/layout/select_album.xml
index 54c4b74a..f2adf21b 100644
--- a/subsonic-android/res/layout/select_album.xml
+++ b/subsonic-android/res/layout/select_album.xml
@@ -28,12 +28,50 @@
android:layout_weight="1.0"
android:fastScrollEnabled="true"
/>
+
+ <LinearLayout android:orientation="horizontal"
+ android:layout_marginTop="6dp"
+ android:layout_marginBottom="3dp"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+
+ <Button android:id="@+id/select_album_pin"
+ android:text="@string/common.pin"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_marginLeft="6dp"
+ android:layout_marginRight="3dp"
+ android:layout_weight="1"
+ android:layout_width="0dp"
+ android:layout_height="fill_parent"
+ android:visibility="gone"/>
- <LinearLayout android:orientation="horizontal"
- android:layout_marginTop="6dp"
- android:layout_marginBottom="3dp"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <Button android:id="@+id/select_album_unpin"
+ android:text="@string/common.unpin"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_marginLeft="3dp"
+ android:layout_marginRight="3dp"
+ android:layout_weight="1"
+ android:layout_width="0dp"
+ android:layout_height="fill_parent"
+ android:visibility="gone"/>
+
+ <Button android:id="@+id/select_album_delete"
+ android:text="@string/common.delete"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_marginLeft="3dp"
+ android:layout_marginRight="6dp"
+ android:layout_weight="1"
+ android:layout_width="0dp"
+ android:layout_height="fill_parent"
+ android:visibility="gone"/>
+
+ </LinearLayout>
+
+ <LinearLayout android:orientation="horizontal"
+ android:layout_marginTop="6dp"
+ android:layout_marginBottom="3dp"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
<Button android:id="@+id/select_album_select"
android:text="@string/select_album.select"
diff --git a/subsonic-android/res/layout/select_album_footer.xml b/subsonic-android/res/layout/select_album_footer.xml
index 06727db4..c1a30a1a 100644
--- a/subsonic-android/res/layout/select_album_footer.xml
+++ b/subsonic-android/res/layout/select_album_footer.xml
@@ -7,33 +7,6 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content">
- <Button android:id="@+id/select_album_pin"
- android:text="@string/common.pin"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_marginLeft="6dp"
- android:layout_marginRight="3dp"
- android:layout_weight="1"
- android:layout_width="0dp"
- android:layout_height="fill_parent"/>
-
- <Button android:id="@+id/select_album_unpin"
- android:text="@string/common.unpin"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_marginLeft="3dp"
- android:layout_marginRight="3dp"
- android:layout_weight="1"
- android:layout_width="0dp"
- android:layout_height="fill_parent"/>
-
- <Button android:id="@+id/select_album_delete"
- android:text="@string/common.delete"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_marginLeft="3dp"
- android:layout_marginRight="6dp"
- android:layout_weight="1"
- android:layout_width="0dp"
- android:layout_height="fill_parent"/>
-
<Button android:id="@+id/select_album_more"
android:text="@string/select_album.more"
android:textAppearance="?android:attr/textAppearanceSmall"
diff --git a/subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java
index 1fd3fa71..72439065 100644
--- a/subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java
+++ b/subsonic-android/src/github/daneren2005/subphonic/activity/SelectAlbumActivity.java
@@ -101,10 +101,9 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
selectButton = (Button) findViewById(R.id.select_album_select);
playNowButton = (Button) findViewById(R.id.select_album_play_now);
playLastButton = (Button) findViewById(R.id.select_album_play_last);
- pinButton = (Button) footer.findViewById(R.id.select_album_pin);
- unpinButton = (Button) footer.findViewById(R.id.select_album_unpin);
- unpinButton = (Button) footer.findViewById(R.id.select_album_unpin);
- deleteButton = (Button) footer.findViewById(R.id.select_album_delete);
+ pinButton = (Button) findViewById(R.id.select_album_pin);
+ unpinButton = (Button) findViewById(R.id.select_album_unpin);
+ deleteButton = (Button) findViewById(R.id.select_album_delete);
moreButton = (Button) footer.findViewById(R.id.select_album_more);
emptyView = findViewById(R.id.select_album_empty);
@@ -313,9 +312,6 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
@Override
protected void done(Pair<MusicDirectory, Boolean> result) {
if (!result.getFirst().getChildren().isEmpty()) {
- pinButton.setVisibility(View.GONE);
- unpinButton.setVisibility(View.GONE);
- deleteButton.setVisibility(View.GONE);
moreButton.setVisibility(View.VISIBLE);
entryList.addFooterView(footer);
@@ -550,6 +546,9 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
selectButton.setVisibility(View.VISIBLE);
playNowButton.setVisibility(View.VISIBLE);
playLastButton.setVisibility(View.VISIBLE);
+ pinButton.setVisibility(View.VISIBLE);
+ unpinButton.setVisibility(View.VISIBLE);
+ deleteButton.setVisibility(View.VISIBLE);
}
boolean isAlbumList = getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_TYPE);