aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-11-08 19:10:40 -0800
committerScott Jackson <daneren2005@gmail.com>2013-11-08 19:10:40 -0800
commitb7a29c6058b9e0f1ddb493f55e933062b913484e (patch)
tree7e0992e615c6d56b9a4d44e46ab8c9ec3707dbfe
parent423b719ad2fde340ed013abfbca57f29d0b78f81 (diff)
downloaddsub-b7a29c6058b9e0f1ddb493f55e933062b913484e.tar.gz
dsub-b7a29c6058b9e0f1ddb493f55e933062b913484e.tar.bz2
dsub-b7a29c6058b9e0f1ddb493f55e933062b913484e.zip
Removed some duplicate layouts
-rw-r--r--res/layout/abstract_list_fragment.xml (renamed from res/layout/select_podcasts.xml)58
-rw-r--r--res/layout/basic_list_item.xml (renamed from res/layout/artist_list_item.xml)74
-rw-r--r--res/layout/play_video.xml11
-rw-r--r--res/layout/playlist_list_item.xml26
-rw-r--r--res/layout/search.xml22
-rw-r--r--res/layout/select_artist.xml22
-rw-r--r--res/layout/select_genres.xml30
-rw-r--r--res/layout/select_playlist.xml30
-rw-r--r--res/values/strings.xml5
-rw-r--r--src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java4
-rw-r--r--src/github/daneren2005/dsub/fragments/SearchFragment.java10
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectArtistFragment.java6
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java6
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectGenreFragment.java20
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java12
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java8
-rw-r--r--src/github/daneren2005/dsub/view/ArtistAdapter.java2
-rw-r--r--src/github/daneren2005/dsub/view/ArtistEntryView.java8
-rw-r--r--src/github/daneren2005/dsub/view/ArtistView.java10
-rw-r--r--src/github/daneren2005/dsub/view/GenreView.java9
-rw-r--r--src/github/daneren2005/dsub/view/PlaylistAdapter.java2
-rw-r--r--src/github/daneren2005/dsub/view/PlaylistView.java9
-rw-r--r--src/github/daneren2005/dsub/view/PodcastChannelView.java8
23 files changed, 120 insertions, 272 deletions
diff --git a/res/layout/select_podcasts.xml b/res/layout/abstract_list_fragment.xml
index ea4fb07c..bfce4792 100644
--- a/res/layout/select_podcasts.xml
+++ b/res/layout/abstract_list_fragment.xml
@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/select_podcasts_layout"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
-
- <View
- android:layout_width="fill_parent"
- android:layout_height="1px"
- android:background="@color/dividerColor"/>
-
- <include layout="@layout/tab_progress" />
-
- <TextView
- android:id="@+id/select_podcasts_empty"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"
- android:text="@string/select_podcasts.empty"
- android:visibility="gone" />
-
- <ListView
- android:id="@+id/select_podcasts_list"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1.0"
- android:fastScrollEnabled="true"/>
-</LinearLayout>
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/fragment_list_layout"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1px"
+ android:background="@color/dividerColor"/>
+
+ <include layout="@layout/tab_progress" />
+
+ <TextView
+ android:id="@+id/fragment_list_empty"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="10dip"
+ android:text="@string/common.empty"
+ android:visibility="gone" />
+
+ <ListView
+ android:id="@+id/fragment_list"
+ android:layout_width="fill_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1.0"
+ android:fastScrollEnabled="true"/>
+</LinearLayout>
diff --git a/res/layout/artist_list_item.xml b/res/layout/basic_list_item.xml
index 64512e99..a9d77abb 100644
--- a/res/layout/artist_list_item.xml
+++ b/res/layout/basic_list_item.xml
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/transparent">
-
- <TextView
- android:id="@+id/artist_name"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="left|center_vertical"
- android:paddingLeft="6dip"
- android:paddingRight="6dip"
- android:minHeight="50dip"
- android:background="@android:color/transparent"/>
-
- <ImageButton
- android:id="@+id/artist_star"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right|center_vertical"
- android:src="@drawable/ic_stat_star"
- android:background="@android:color/transparent"
- android:focusable="false"
- android:visibility="gone"/>
-
- <ImageView
- android:id="@+id/artist_more"
- android:src="?attr/download_none"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="right|center_vertical"
- android:paddingRight="6dip"
- android:background="@drawable/menubar_button"/>
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="@android:color/transparent">
+
+ <TextView
+ android:id="@+id/item_name"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:gravity="left|center_vertical"
+ android:paddingLeft="6dip"
+ android:paddingRight="6dip"
+ android:minHeight="50dip"
+ android:background="@android:color/transparent"/>
+
+ <ImageButton
+ android:id="@+id/item_star"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right|center_vertical"
+ android:src="@drawable/ic_stat_star"
+ android:background="@android:color/transparent"
+ android:focusable="false"
+ android:visibility="gone"/>
+
+ <ImageView
+ android:id="@+id/item_more"
+ android:src="?attr/download_none"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_gravity="right|center_vertical"
+ android:paddingRight="6dip"
+ android:background="@drawable/menubar_button"/>
</LinearLayout> \ No newline at end of file
diff --git a/res/layout/play_video.xml b/res/layout/play_video.xml
deleted file mode 100644
index 6a9f3f74..00000000
--- a/res/layout/play_video.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <WebView
- android:id="@+id/play_video_contents"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"/>
-
-</FrameLayout>
diff --git a/res/layout/playlist_list_item.xml b/res/layout/playlist_list_item.xml
deleted file mode 100644
index 80c350f6..00000000
--- a/res/layout/playlist_list_item.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <TextView
- android:id="@+id/playlist_name"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="left|center_vertical"
- android:paddingLeft="6dip"
- android:paddingRight="6dip"
- android:minHeight="50dip"/>
-
- <ImageView
- android:id="@+id/playlist_more"
- android:src="?attr/download_none"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="right|center_vertical"
- android:paddingRight="6dip"
- android:background="@drawable/menubar_button"/>
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/search.xml b/res/layout/search.xml
deleted file mode 100644
index d1c5c84c..00000000
--- a/res/layout/search.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/search_layout"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <View
- android:layout_width="fill_parent"
- android:layout_height="1px"
- android:background="@color/dividerColor"/>
-
- <include layout="@layout/tab_progress"/>
-
- <ListView
- android:id="@+id/search_list"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1.0"
- android:fastScrollEnabled="true"
- />
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/select_artist.xml b/res/layout/select_artist.xml
deleted file mode 100644
index fef51d3c..00000000
--- a/res/layout/select_artist.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/select_artist_layout"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <View
- android:layout_width="fill_parent"
- android:layout_height="1px"
- android:background="@color/dividerColor"/>
-
- <include layout="@layout/tab_progress"/>
-
- <ListView android:id="@+id/select_artist_list"
- android:textFilterEnabled="true"
- android:fastScrollEnabled="true"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1.0"/>
-</LinearLayout>
-
diff --git a/res/layout/select_genres.xml b/res/layout/select_genres.xml
deleted file mode 100644
index 95f9d415..00000000
--- a/res/layout/select_genres.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/select_genre_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
-
- <include layout="@layout/tab_progress" />
-
- <TextView
- android:id="@+id/select_genre_empty"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"
- android:text="@string/select_genre.empty"
- android:visibility="gone" />
-
- <ListView
- android:id="@+id/select_genre_list"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1.0"
- android:textFilterEnabled="true"
- android:fastScrollEnabled="true"/>
- </LinearLayout>
-</FrameLayout> \ No newline at end of file
diff --git a/res/layout/select_playlist.xml b/res/layout/select_playlist.xml
deleted file mode 100644
index e18283bd..00000000
--- a/res/layout/select_playlist.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/select_playlist_layout"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <View
- android:layout_width="fill_parent"
- android:layout_height="1px"
- android:background="@color/dividerColor"/>
-
- <include layout="@layout/tab_progress"/>
-
- <TextView
- android:id="@+id/select_playlist_empty"
- android:text="@string/select_playlist.empty"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="10dip"
- android:visibility="gone"/>
-
- <ListView android:id="@+id/select_playlist_list"
- android:layout_width="fill_parent"
- android:layout_height="0dip"
- android:layout_weight="1.0"
- android:fastScrollEnabled="true"/>
-
-</LinearLayout>
-
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 863fe2ec..d162cd81 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -22,6 +22,7 @@
<string name="common.stream_external">Stream Video</string>
<string name="common.confirm">Confirm</string>
<string name="common.confirm_message">Do you want to %1$s %2$s?</string>
+ <string name="common.empty">None found</string>
<string name="button_bar.home">Home</string>
<string name="button_bar.browse">Library</string>
@@ -130,10 +131,8 @@
<string name="offline.sync_partial">Successfully synced %1$d of %2$d songs</string>
<string name="offline.sync_error">Failed to sync songs</string>
- <string name="select_genre.empty">No genres found</string>
<string name="select_genre.blank">Blank</string>
- <string name="select_podcasts.empty">No podcasts found</string>
<string name="select_podcasts.error">This podcast had an error while downloading on the server. The server must download it first.</string>
<string name="select_podcasts.skipped">This podcast has not been downloaded on the server. The server must download it first.</string>
<string name="select_podcasts.initializing">This podcast channel is being initialized on the server. Please reload after a moment.</string>
@@ -147,8 +146,6 @@
<string name="select_podcasts.created_error">Failed to add podcast</string>
<string name="select_podcasts.invalid_podcast_channel">Invalid podcast channel: %s</string>
- <string name="select_playlist.empty">No saved playlists on server</string>
-
<string name="download.empty">Playlist is empty</string>
<string name="download.shuffle_loading">Shuffle list is loading...</string>
<string name="download.playerstate_downloading">Downloading - %s</string>
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
index 4df064e5..9c006ae1 100644
--- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
+++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
@@ -223,7 +223,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
};
if(getIntent().hasExtra(Constants.INTENT_EXTRA_VIEW_ALBUM)) {
- int fragmentID = R.id.select_artist_layout;
+ int fragmentID = R.id.fragment_list_layout;
if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_PARENT_ID)) {
SubsonicFragment fragment = new SelectDirectoryFragment();
Bundle args = new Bundle();
@@ -231,7 +231,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
args.putString(Constants.INTENT_EXTRA_NAME_NAME, getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_PARENT_NAME));
fragment.setArguments(args);
- replaceFragment(fragment, R.id.select_artist_layout, currentFragment.getSupportTag());
+ replaceFragment(fragment, R.id.fragment_list_layout, currentFragment.getSupportTag());
fragmentID = fragment.getRootId();
}
diff --git a/src/github/daneren2005/dsub/fragments/SearchFragment.java b/src/github/daneren2005/dsub/fragments/SearchFragment.java
index 61516e28..25fee43d 100644
--- a/src/github/daneren2005/dsub/fragments/SearchFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SearchFragment.java
@@ -81,7 +81,7 @@ public class SearchFragment extends SubsonicFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
- rootView = inflater.inflate(R.layout.search, container, false);
+ rootView = inflater.inflate(R.layout.abstract_list_fragment, container, false);
setTitle(R.string.search_title);
View buttons = inflater.inflate(R.layout.search_buttons, null);
@@ -94,7 +94,7 @@ public class SearchFragment extends SubsonicFragment {
moreAlbumsButton = buttons.findViewById(R.id.search_more_albums);
moreSongsButton = buttons.findViewById(R.id.search_more_songs);
- list = (ListView) rootView.findViewById(R.id.search_list);
+ list = (ListView) rootView.findViewById(R.id.fragment_list);
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
@@ -293,11 +293,11 @@ public class SearchFragment extends SubsonicFragment {
args.putString(Constants.INTENT_EXTRA_NAME_NAME, artist.getName());
fragment.setArguments(args);
- replaceFragment(fragment, R.id.search_layout);
+ replaceFragment(fragment, R.id.fragment_list_layout);
}
private void onAlbumSelected(MusicDirectory.Entry album, boolean autoplay) {
- int id = R.id.search_layout;
+ int id = R.id.fragment_list_layout;
Bundle args;
if(album.getParent() != null) {
SubsonicFragment parentFragment = new SelectDirectoryFragment();
@@ -306,7 +306,7 @@ public class SearchFragment extends SubsonicFragment {
args.putString(Constants.INTENT_EXTRA_NAME_NAME, album.getArtist());
parentFragment.setArguments(args);
- replaceFragment(parentFragment, R.id.search_layout);
+ replaceFragment(parentFragment, R.id.fragment_list_layout);
id = parentFragment.getRootId();
}
diff --git a/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java b/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
index f1f0fa8c..7cca8d6c 100644
--- a/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectArtistFragment.java
@@ -63,9 +63,9 @@ public class SelectArtistFragment extends SubsonicFragment implements AdapterVie
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
- rootView = inflater.inflate(R.layout.select_artist, container, false);
+ rootView = inflater.inflate(R.layout.abstract_list_fragment, container, false);
- artistList = (ListView) rootView.findViewById(R.id.select_artist_list);
+ artistList = (ListView) rootView.findViewById(R.id.fragment_list);
artistList.setOnItemClickListener(this);
folderButtonParent = inflater.inflate(R.layout.select_artist_header, artistList, false);
@@ -170,7 +170,7 @@ public class SelectArtistFragment extends SubsonicFragment implements AdapterVie
}
fragment.setArguments(args);
- replaceFragment(fragment, R.id.select_artist_layout);
+ replaceFragment(fragment, R.id.fragment_list_layout);
}
}
diff --git a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
index 909e86f3..cf57ce58 100644
--- a/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectBookmarkFragment.java
@@ -63,11 +63,11 @@ public class SelectBookmarkFragment extends SubsonicFragment implements AdapterV
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
- rootView = inflater.inflate(R.layout.select_genres, container, false);
+ rootView = inflater.inflate(R.layout.abstract_list_fragment, container, false);
- bookmarkListView = (ListView)rootView.findViewById(R.id.select_genre_list);
+ bookmarkListView = (ListView)rootView.findViewById(R.id.fragment_list);
bookmarkListView.setOnItemClickListener(this);
- emptyView = rootView.findViewById(R.id.select_genre_empty);
+ emptyView = rootView.findViewById(R.id.fragment_list_empty);
if(bookmarks == null) {
refresh();
diff --git a/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java b/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
index 2a6693ca..e6bf66b6 100644
--- a/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectGenreFragment.java
@@ -64,11 +64,11 @@ public class SelectGenreFragment extends SubsonicFragment implements AdapterView
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
- rootView = inflater.inflate(R.layout.select_genres, container, false);
+ rootView = inflater.inflate(R.layout.abstract_list_fragment, container, false);
- genreListView = (ListView)rootView.findViewById(R.id.select_genre_list);
+ genreListView = (ListView)rootView.findViewById(R.id.fragment_list);
genreListView.setOnItemClickListener(this);
- emptyView = rootView.findViewById(R.id.select_genre_empty);
+ emptyView = rootView.findViewById(R.id.fragment_list_empty);
if(genres == null) {
refresh();
@@ -92,18 +92,6 @@ public class SelectGenreFragment extends SubsonicFragment implements AdapterView
return false;
}
-
- @Override
- public void setPrimaryFragment(boolean primary) {
- super.setPrimaryFragment(primary);
- if(rootView != null) {
- if(primary) {
- ((ViewGroup)rootView).getChildAt(0).setVisibility(View.VISIBLE);
- } else {
- ((ViewGroup)rootView).getChildAt(0).setVisibility(View.GONE);
- }
- }
- }
@Override
protected void refresh(boolean refresh) {
@@ -155,6 +143,6 @@ public class SelectGenreFragment extends SubsonicFragment implements AdapterView
args.putString(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_EXTRA, genre.getName());
fragment.setArguments(args);
- replaceFragment(fragment, R.id.select_genre_layout);
+ replaceFragment(fragment, R.id.fragment_list_layout);
}
}
diff --git a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
index 48338b3d..9ae229b8 100644
--- a/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectPlaylistFragment.java
@@ -59,10 +59,10 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
- rootView = inflater.inflate(R.layout.select_playlist, container, false);
+ rootView = inflater.inflate(R.layout.abstract_list_fragment, container, false);
- list = (ListView) rootView.findViewById(R.id.select_playlist_list);
- emptyTextView = rootView.findViewById(R.id.select_playlist_empty);
+ list = (ListView) rootView.findViewById(R.id.fragment_list);
+ emptyTextView = rootView.findViewById(R.id.fragment_list_empty);
list.setOnItemClickListener(this);
registerForContextMenu(list);
@@ -133,7 +133,7 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV
args.putBoolean(Constants.INTENT_EXTRA_NAME_AUTOPLAY, true);
fragment.setArguments(args);
- replaceFragment(fragment, R.id.select_playlist_layout);
+ replaceFragment(fragment, R.id.fragment_list_layout);
break;
case R.id.playlist_menu_play_shuffled:
fragment = new SelectDirectoryFragment();
@@ -144,7 +144,7 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV
args.putBoolean(Constants.INTENT_EXTRA_NAME_AUTOPLAY, true);
fragment.setArguments(args);
- replaceFragment(fragment, R.id.select_playlist_layout);
+ replaceFragment(fragment, R.id.fragment_list_layout);
break;
case R.id.playlist_menu_delete:
deletePlaylist(playlist);
@@ -171,7 +171,7 @@ public class SelectPlaylistFragment extends SubsonicFragment implements AdapterV
args.putString(Constants.INTENT_EXTRA_NAME_PLAYLIST_NAME, playlist.getName());
fragment.setArguments(args);
- replaceFragment(fragment, R.id.select_playlist_layout);
+ replaceFragment(fragment, R.id.fragment_list_layout);
}
@Override
diff --git a/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java b/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
index e9a06076..3ce7917e 100644
--- a/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectPodcastsFragment.java
@@ -81,12 +81,12 @@ public class SelectPodcastsFragment extends SubsonicFragment implements AdapterV
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
- rootView = inflater.inflate(R.layout.select_podcasts, container, false);
+ rootView = inflater.inflate(R.layout.abstract_list_fragment, container, false);
- podcastListView = (ListView)rootView.findViewById(R.id.select_podcasts_list);
+ podcastListView = (ListView)rootView.findViewById(R.id.fragment_list);
podcastListView.setOnItemClickListener(this);
registerForContextMenu(podcastListView);
- emptyView = rootView.findViewById(R.id.select_podcasts_empty);
+ emptyView = rootView.findViewById(R.id.fragment_list_empty);
if(channels == null) {
if(!primaryFragment) {
@@ -205,7 +205,7 @@ public class SelectPodcastsFragment extends SubsonicFragment implements AdapterV
args.putString(Constants.INTENT_EXTRA_NAME_PODCAST_DESCRIPTION, channel.getDescription());
fragment.setArguments(args);
- replaceFragment(fragment, R.id.select_podcasts_layout);
+ replaceFragment(fragment, R.id.fragment_list_layout);
}
}
diff --git a/src/github/daneren2005/dsub/view/ArtistAdapter.java b/src/github/daneren2005/dsub/view/ArtistAdapter.java
index ff66f396..1998eaed 100644
--- a/src/github/daneren2005/dsub/view/ArtistAdapter.java
+++ b/src/github/daneren2005/dsub/view/ArtistAdapter.java
@@ -42,7 +42,7 @@ public class ArtistAdapter extends ArrayAdapter<Artist> implements SectionIndexe
private final Integer[] positions;
public ArtistAdapter(Context activity, List<Artist> artists) {
- super(activity, R.layout.artist_list_item, artists);
+ super(activity, R.layout.basic_list_item, artists);
this.activity = activity;
Set<String> sectionSet = new LinkedHashSet<String>(30);
diff --git a/src/github/daneren2005/dsub/view/ArtistEntryView.java b/src/github/daneren2005/dsub/view/ArtistEntryView.java
index 1d3993a0..958b4b87 100644
--- a/src/github/daneren2005/dsub/view/ArtistEntryView.java
+++ b/src/github/daneren2005/dsub/view/ArtistEntryView.java
@@ -48,12 +48,12 @@ public class ArtistEntryView extends UpdateView {
public ArtistEntryView(Context context) {
super(context);
this.context = context;
- LayoutInflater.from(context).inflate(R.layout.artist_list_item, this, true);
+ LayoutInflater.from(context).inflate(R.layout.basic_list_item, this, true);
- titleView = (TextView) findViewById(R.id.artist_name);
- starButton = (ImageButton) findViewById(R.id.artist_star);
+ titleView = (TextView) findViewById(R.id.item_name);
+ starButton = (ImageButton) findViewById(R.id.item_star);
starButton.setFocusable(false);
- moreButton = (ImageView) findViewById(R.id.artist_more);
+ moreButton = (ImageView) findViewById(R.id.item_more);
moreButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
v.showContextMenu();
diff --git a/src/github/daneren2005/dsub/view/ArtistView.java b/src/github/daneren2005/dsub/view/ArtistView.java
index 2a284905..6f54e800 100644
--- a/src/github/daneren2005/dsub/view/ArtistView.java
+++ b/src/github/daneren2005/dsub/view/ArtistView.java
@@ -47,12 +47,12 @@ public class ArtistView extends UpdateView {
public ArtistView(Context context) {
super(context);
this.context = context;
- LayoutInflater.from(context).inflate(R.layout.artist_list_item, this, true);
+ LayoutInflater.from(context).inflate(R.layout.basic_list_item, this, true);
- titleView = (TextView) findViewById(R.id.artist_name);
- starButton = (ImageButton) findViewById(R.id.artist_star);
- starButton.setFocusable(false);
- moreButton = (ImageView) findViewById(R.id.artist_more);
+ titleView = (TextView) findViewById(R.id.item_name);
+ starButton = (ImageButton) findViewById(R.id.item_star);
+ starButton.setFocusable(false);
+ moreButton = (ImageView) findViewById(R.id.item_more);
moreButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
v.showContextMenu();
diff --git a/src/github/daneren2005/dsub/view/GenreView.java b/src/github/daneren2005/dsub/view/GenreView.java
index 69456c28..6a8e04ef 100644
--- a/src/github/daneren2005/dsub/view/GenreView.java
+++ b/src/github/daneren2005/dsub/view/GenreView.java
@@ -34,12 +34,13 @@ public class GenreView extends UpdateView {
public GenreView(Context context) {
super(context);
- LayoutInflater.from(context).inflate(R.layout.artist_list_item, this, true);
+ LayoutInflater.from(context).inflate(R.layout.basic_list_item, this, true);
- titleView = (TextView) findViewById(R.id.artist_name);
- starButton = (ImageButton) findViewById(R.id.artist_star);
+ titleView = (TextView) findViewById(R.id.item_name);
+ starButton = (ImageButton) findViewById(R.id.item_star);
starButton.setFocusable(false);
- moreButton = (ImageView) findViewById(R.id.artist_more);
+ moreButton = (ImageView) findViewById(R.id.item_more);
+ moreButton.setVisibility(View.GONE);
moreButton.setClickable(false);
}
diff --git a/src/github/daneren2005/dsub/view/PlaylistAdapter.java b/src/github/daneren2005/dsub/view/PlaylistAdapter.java
index f25996dd..ff0294b7 100644
--- a/src/github/daneren2005/dsub/view/PlaylistAdapter.java
+++ b/src/github/daneren2005/dsub/view/PlaylistAdapter.java
@@ -36,7 +36,7 @@ public class PlaylistAdapter extends ArrayAdapter<Playlist> {
private final Context activity;
public PlaylistAdapter(Context activity, List<Playlist> Playlists) {
- super(activity, R.layout.playlist_list_item, Playlists);
+ super(activity, R.layout.basic_list_item, Playlists);
this.activity = activity;
}
diff --git a/src/github/daneren2005/dsub/view/PlaylistView.java b/src/github/daneren2005/dsub/view/PlaylistView.java
index 31332b22..b5034493 100644
--- a/src/github/daneren2005/dsub/view/PlaylistView.java
+++ b/src/github/daneren2005/dsub/view/PlaylistView.java
@@ -21,6 +21,7 @@ package github.daneren2005.dsub.view;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
+import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import github.daneren2005.dsub.R;
@@ -46,10 +47,12 @@ public class PlaylistView extends UpdateView {
public PlaylistView(Context context) {
super(context);
this.context = context;
- LayoutInflater.from(context).inflate(R.layout.playlist_list_item, this, true);
+ LayoutInflater.from(context).inflate(R.layout.basic_list_item, this, true);
- titleView = (TextView) findViewById(R.id.playlist_name);
- moreButton = (ImageView) findViewById(R.id.playlist_more);
+ titleView = (TextView) findViewById(R.id.item_name);
+ starButton = (ImageButton) findViewById(R.id.item_star);
+ starButton.setFocusable(false);
+ moreButton = (ImageView) findViewById(R.id.item_more);
moreButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
v.showContextMenu();
diff --git a/src/github/daneren2005/dsub/view/PodcastChannelView.java b/src/github/daneren2005/dsub/view/PodcastChannelView.java
index 5b9225d7..9ad78d1c 100644
--- a/src/github/daneren2005/dsub/view/PodcastChannelView.java
+++ b/src/github/daneren2005/dsub/view/PodcastChannelView.java
@@ -41,12 +41,12 @@ public class PodcastChannelView extends UpdateView {
public PodcastChannelView(Context context) {
super(context);
this.context = context;
- LayoutInflater.from(context).inflate(R.layout.artist_list_item, this, true);
+ LayoutInflater.from(context).inflate(R.layout.basic_list_item, this, true);
- titleView = (TextView) findViewById(R.id.artist_name);
- starButton = (ImageButton) findViewById(R.id.artist_star);
+ titleView = (TextView) findViewById(R.id.item_name);
+ starButton = (ImageButton) findViewById(R.id.item_star);
starButton.setFocusable(false);
- moreButton = (ImageView) findViewById(R.id.artist_more);
+ moreButton = (ImageView) findViewById(R.id.item_more);
moreButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
v.showContextMenu();