aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/res/layout/select_artist.xml1
-rw-r--r--subsonic-android/res/layout/select_artist_header.xml65
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java4
3 files changed, 38 insertions, 32 deletions
diff --git a/subsonic-android/res/layout/select_artist.xml b/subsonic-android/res/layout/select_artist.xml
index b1e64e17..fef51d3c 100644
--- a/subsonic-android/res/layout/select_artist.xml
+++ b/subsonic-android/res/layout/select_artist.xml
@@ -10,7 +10,6 @@
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/res/layout/select_artist_header.xml b/subsonic-android/res/layout/select_artist_header.xml
index 50e10742..0b3d151b 100644
--- a/subsonic-android/res/layout/select_artist_header.xml
+++ b/subsonic-android/res/layout/select_artist_header.xml
@@ -1,38 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/select_artist_folder"
- android:orientation="horizontal"
- android:paddingTop="2dip"
- android:paddingBottom="2dip"
- android:paddingLeft="6dp"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight">
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+ <LinearLayout
+ android:id="@+id/select_artist_folder"
+ android:orientation="horizontal"
+ android:paddingTop="2dip"
+ android:paddingBottom="2dip"
+ android:paddingLeft="6dp"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight">
- <ImageView
- android:src="@drawable/main_select_server"
- android:layout_gravity="center_vertical"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
+ <ImageView
+ android:src="@drawable/main_select_server"
+ android:layout_gravity="center_vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
- <TextView android:id="@+id/select_artist_folder_1"
- android:text="@string/select_artist.folder"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:layout_marginTop="6dip"
- android:textAppearance="?android:attr/textAppearanceLarge"/>
+ <TextView android:id="@+id/select_artist_folder_1"
+ android:text="@string/select_artist.folder"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="10dip"
+ android:layout_marginTop="6dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"/>
- <TextView android:id="@+id/select_artist_folder_2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:textAppearance="?android:attr/textAppearanceSmall"/>
+ <TextView android:id="@+id/select_artist_folder_2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="10dip"
+ android:textAppearance="?android:attr/textAppearanceSmall"/>
- </LinearLayout>
+ </LinearLayout>
+ </LinearLayout>
</LinearLayout> \ No newline at end of file
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
index 35daaa83..1ed5bb43 100644
--- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
+++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
@@ -51,8 +51,10 @@ public class SelectArtistFragment extends SubsonicFragment implements AdapterVie
artistList = (ListView) rootView.findViewById(R.id.select_artist_list);
artistList.setOnItemClickListener(this);
- folderButton = rootView.findViewById(R.id.select_artist_folder);
+ folderButton = inflater.inflate(R.layout.select_artist_header, artistList, false);
folderName = (TextView) folderButton.findViewById(R.id.select_artist_folder_2);
+ artistList.addHeaderView(folderButton);
+ folderButton = folderButton.findViewById(R.id.select_artist_folder);
registerForContextMenu(artistList);
invalidated = true;