summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2014-09-04 15:27:36 -0700
committerlinus_lee <llee@cyngn.com>2014-11-20 12:01:48 -0800
commit793c6b6f498efce10b19c714628f13520dea71d4 (patch)
tree38b4b1789c6c34c63722e74ca7ba76a88bac8c9a
parentec483258af4af4ceca491974660a8b6fa4c93643 (diff)
downloadandroid_packages_apps_Eleven-793c6b6f498efce10b19c714628f13520dea71d4.tar.gz
android_packages_apps_Eleven-793c6b6f498efce10b19c714628f13520dea71d4.tar.bz2
android_packages_apps_Eleven-793c6b6f498efce10b19c714628f13520dea71d4.zip
Eleven: add inset padding dividers to queue and playlist song lists
Change-Id: Ib2cadbf1668b99a381a877fba26164e1dd3d7d5e Signed-off-by: Roman Birg <roman@cyngn.com>
-rw-r--r--res/drawable/inset_list_divider.xml26
-rw-r--r--res/layout/list_base_nopadding.xml46
-rw-r--r--src/com/cyngn/eleven/ui/fragments/QueueFragment.java2
-rw-r--r--src/com/cyngn/eleven/ui/fragments/profile/PlaylistSongFragment.java2
4 files changed, 74 insertions, 2 deletions
diff --git a/res/drawable/inset_list_divider.xml b/res/drawable/inset_list_divider.xml
new file mode 100644
index 0000000..5bff56a
--- /dev/null
+++ b/res/drawable/inset_list_divider.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2014 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetLeft="@dimen/list_preferred_item_padding"
+ android:insetRight="@dimen/list_preferred_item_padding" >
+
+ <shape>
+ <solid android:color="@color/list_item_divider_color" />
+ <corners android:radius="1.0dip" />
+ </shape>
+
+</inset> \ No newline at end of file
diff --git a/res/layout/list_base_nopadding.xml b/res/layout/list_base_nopadding.xml
new file mode 100644
index 0000000..f9e642a
--- /dev/null
+++ b/res/layout/list_base_nopadding.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2012 Andrew Neal
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/list_base_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingTop="@dimen/list_preferred_item_padding"
+>
+
+ <TextView
+ android:id="@+id/empty"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical|center"
+ android:padding="@dimen/list_preferred_item_padding"
+ android:textColor="@color/holo_blue_light"
+ android:textSize="@dimen/text_size_large"
+ android:textStyle="bold"
+ android:visibility="gone" />
+
+ <com.cyngn.eleven.dragdrop.DragSortListView
+ android:id="@+id/list_base"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:cacheColorHint="@color/transparent"
+ android:drawSelectorOnTop="false"
+ android:fadingEdge="vertical"
+ android:fastScrollEnabled="true"
+ android:dividerHeight="1dp"
+ android:divider="@drawable/inset_list_divider"/>
+
+</FrameLayout> \ No newline at end of file
diff --git a/src/com/cyngn/eleven/ui/fragments/QueueFragment.java b/src/com/cyngn/eleven/ui/fragments/QueueFragment.java
index 1aafce8..1b9ca85 100644
--- a/src/com/cyngn/eleven/ui/fragments/QueueFragment.java
+++ b/src/com/cyngn/eleven/ui/fragments/QueueFragment.java
@@ -140,7 +140,7 @@ public class QueueFragment extends Fragment implements LoaderCallbacks<List<Song
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
final Bundle savedInstanceState) {
// The View for the fragment's UI
- final ViewGroup rootView = (ViewGroup)inflater.inflate(R.layout.list_base, null);
+ final ViewGroup rootView = (ViewGroup)inflater.inflate(R.layout.list_base_nopadding, null);
// Initialize the list
mListView = (DragSortListView)rootView.findViewById(R.id.list_base);
// Set the data behind the list
diff --git a/src/com/cyngn/eleven/ui/fragments/profile/PlaylistSongFragment.java b/src/com/cyngn/eleven/ui/fragments/profile/PlaylistSongFragment.java
index eb38197..e67be06 100644
--- a/src/com/cyngn/eleven/ui/fragments/profile/PlaylistSongFragment.java
+++ b/src/com/cyngn/eleven/ui/fragments/profile/PlaylistSongFragment.java
@@ -147,7 +147,7 @@ public class PlaylistSongFragment extends Fragment implements LoaderCallbacks<Li
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
final Bundle savedInstanceState) {
// The View for the fragment's UI
- final ViewGroup rootView = (ViewGroup)inflater.inflate(R.layout.list_base, null);
+ final ViewGroup rootView = (ViewGroup)inflater.inflate(R.layout.list_base_nopadding, null);
// Initialize the list
mListView = (DragSortListView)rootView.findViewById(R.id.list_base);
// Set the data behind the list