aboutsummaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2013-11-02 02:20:56 +0100
committerJorge Ruesga <jorge@ruesga.com>2013-11-02 02:20:56 +0100
commit4effddfe30fd045834232f6bb66070edf079578d (patch)
tree2e57f74d55685891a49b02ec069c118cf5b15110 /res/layout
parentca2f0060cc367ac8174a27a3124cd0124e49c627 (diff)
downloadandroid_packages_wallpapers_PhotoPhase-4effddfe30fd045834232f6bb66070edf079578d.tar.gz
android_packages_wallpapers_PhotoPhase-4effddfe30fd045834232f6bb66070edf079578d.tar.bz2
android_packages_wallpapers_PhotoPhase-4effddfe30fd045834232f6bb66070edf079578d.zip
Multiples fixes
- Fully rewrite the album selection preference - Fix multiple style - Fix lints - Resources cleanup Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/album_info.xml107
-rw-r--r--res/layout/album_pictures.xml79
-rw-r--r--res/layout/choose_disposition_fragment.xml2
-rw-r--r--res/layout/choose_picture_fragment.xml26
-rw-r--r--res/layout/color_picker_pref_item.xml2
-rw-r--r--res/layout/picture_item.xml31
-rw-r--r--res/layout/pictures_view.xml (renamed from res/layout/album.xml)28
-rw-r--r--res/layout/preference_widget_seekbar.xml4
-rw-r--r--res/layout/preference_widget_seekbar_progress.xml2
9 files changed, 107 insertions, 174 deletions
diff --git a/res/layout/album_info.xml b/res/layout/album_info.xml
index fc44edd..fa0e30e 100644
--- a/res/layout/album_info.xml
+++ b/res/layout/album_info.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2013 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,66 +14,73 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<org.cyanogenmod.wallpapers.photophase.widgets.AlbumInfo
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- style="@style/PhotoPhase.Album">
+ android:layout_height="wrap_content">
- <ImageView android:id="@+id/album_thumbnail"
- android:layout_width="@dimen/album_size"
- android:layout_height="@dimen/album_size"
- android:scaleType="fitXY"
- android:layout_marginRight="@dimen/album_margin"
- android:contentDescription="@null"
- style="@style/PhotoPhase.Album.Thumbnail" />
-
- <TextView android:id="@+id/album_selected_items"
- android:layout_width="wrap_content"
+ <org.cyanogenmod.wallpapers.photophase.widgets.AlbumInfoView
+ android:id="@+id/album_info"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignRight="@id/album_thumbnail"
- android:layout_alignBottom="@id/album_thumbnail"
- style="@style/PhotoPhase.Notification" />
+ style="@style/PhotoPhase.Album">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_toRightOf="@id/album_thumbnail"
- android:layout_alignTop="@id/album_thumbnail"
- android:layout_alignBottom="@id/album_thumbnail"
- android:orientation="vertical"
- style="@style/PhotoPhase.Album.Info">
+ <ImageView android:id="@+id/album_thumbnail"
+ android:layout_width="@dimen/album_size"
+ android:layout_height="@dimen/album_size"
+ android:scaleType="fitXY"
+ android:layout_marginRight="@dimen/album_margin"
+ android:contentDescription="@null"
+ style="@style/PhotoPhase.Album.Thumbnail" />
- <TextView android:id="@+id/album_name"
+ <TextView android:id="@+id/album_selected_items"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingBottom="@dimen/album_info_margin"
- android:gravity="bottom"
- android:ellipsize="end"
- android:singleLine="true"
- style="@style/PhotoPhase.TextAppearance.Primary" />
+ android:layout_alignRight="@id/album_thumbnail"
+ android:layout_alignBottom="@id/album_thumbnail"
+ style="@style/PhotoPhase.Notification" />
- <TextView android:id="@+id/album_items"
+ <ImageView android:id="@+id/overflow_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingTop="@dimen/album_info_margin"
- android:gravity="top"
- android:ellipsize="end"
- android:singleLine="true"
- style="@style/PhotoPhase.TextAppearance.Secondary" />
+ android:layout_alignParentRight="true"
+ android:layout_alignBottom="@id/album_thumbnail"
+ android:layout_gravity="top"
+ android:padding="@dimen/small_padding"
+ android:contentDescription="@null"
+ style="@style/PhotoPhase.Album.MenuBar.Overflow" />
- </LinearLayout>
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_toRightOf="@id/album_thumbnail"
+ android:layout_toLeftOf="@id/overflow_button"
+ android:layout_alignTop="@id/album_thumbnail"
+ android:layout_alignBottom="@id/album_thumbnail"
+ android:orientation="vertical"
+ style="@style/PhotoPhase.Album.Info">
- <ImageView android:id="@+id/overflow"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignBottom="@id/album_thumbnail"
- android:layout_gravity="top"
- android:padding="@dimen/small_padding"
- android:contentDescription="@null"
- style="@style/PhotoPhase.Album.MenuBar.Overflow" />
+ <TextView android:id="@+id/album_name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingBottom="@dimen/album_info_margin"
+ android:gravity="bottom"
+ android:ellipsize="end"
+ android:singleLine="true"
+ style="@style/PhotoPhase.TextAppearance.Primary" />
+
+ <TextView android:id="@+id/album_items"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingTop="@dimen/album_info_margin"
+ android:gravity="top"
+ android:ellipsize="end"
+ android:singleLine="true"
+ style="@style/PhotoPhase.TextAppearance.Secondary" />
+
+ </LinearLayout>
-</org.cyanogenmod.wallpapers.photophase.widgets.AlbumInfo>
+ </org.cyanogenmod.wallpapers.photophase.widgets.AlbumInfoView>
+</FrameLayout>
diff --git a/res/layout/album_pictures.xml b/res/layout/album_pictures.xml
deleted file mode 100644
index 6b42ca1..0000000
--- a/res/layout/album_pictures.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 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.
--->
-<org.cyanogenmod.wallpapers.photophase.widgets.AlbumPictures xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@drawable/card"
- style="@style/PhotoPhase.Album">
-
- <TextView android:id="@+id/album_pictures_title"
- android:layout_width="@dimen/album_size"
- android:layout_height="@dimen/album_title_height"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- style="@style/PhotoPhase.Album.Title" />
-
- <LinearLayout android:id="@+id/album_menubar"
- android:layout_width="wrap_content"
- android:layout_height="@dimen/album_size"
- android:layout_marginLeft="@dimen/small_margin"
- android:layout_marginRight="@dimen/small_margin"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:orientation="vertical">
-
- <ImageView android:id="@+id/back"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:contentDescription="@null"
- style="@style/PhotoPhase.Album.MenuBar.Return" />
-
- <Space
- android:layout_width="0dp"
- android:layout_height="wrap_content"/>
-
- <ImageView android:id="@+id/overflow"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:contentDescription="@null"
- style="@style/PhotoPhase.Album.MenuBar.Overflow" />
- </LinearLayout>
-
- <org.cyanogenmod.wallpapers.photophase.widgets.PicturesView
- android:id="@+id/album_pictures_scroller"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/album_title_height"
- android:layout_alignParentLeft="true"
- android:layout_toLeftOf="@id/album_menubar"
- android:fillViewport="true"
- android:scrollbars="none"
- android:layout_weight="1">
-
- <LinearLayout android:id="@+id/album_pictures_holder"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <!-- Pictures go here -->
-
- </LinearLayout>
- </org.cyanogenmod.wallpapers.photophase.widgets.PicturesView>
-
-</org.cyanogenmod.wallpapers.photophase.widgets.AlbumPictures>
diff --git a/res/layout/choose_disposition_fragment.xml b/res/layout/choose_disposition_fragment.xml
index 1267f2e..a72f148 100644
--- a/res/layout/choose_disposition_fragment.xml
+++ b/res/layout/choose_disposition_fragment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2013 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/res/layout/choose_picture_fragment.xml b/res/layout/choose_picture_fragment.xml
index 1df53fa..8966c74 100644
--- a/res/layout/choose_picture_fragment.xml
+++ b/res/layout/choose_picture_fragment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2013 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,20 +14,22 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<org.cyanogenmod.wallpapers.photophase.widgets.VerticalEndlessScroller
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fillViewport="true"
- android:scrollbars="none">
+ android:layout_height="match_parent">
- <org.cyanogenmod.wallpapers.photophase.widgets.CardLayout
+ <!-- Albums card view -->
+ <ListView
android:id="@+id/albums_panel"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="@dimen/small_margin" />
+ android:layout_height="match_parent"
+ android:persistentDrawingCache="animation|scrolling"
+ android:listSelector="@android:color/transparent"
+ android:divider="@android:color/transparent"
+ android:dividerHeight="@dimen/one_dp"
+ android:paddingTop="@dimen/small_margin"
+ android:paddingBottom="@dimen/small_padding"
+ android:scrollbars="none"/>
-</org.cyanogenmod.wallpapers.photophase.widgets.VerticalEndlessScroller>
+</FrameLayout>
diff --git a/res/layout/color_picker_pref_item.xml b/res/layout/color_picker_pref_item.xml
index 569da71..cca2efd 100644
--- a/res/layout/color_picker_pref_item.xml
+++ b/res/layout/color_picker_pref_item.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2013 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/res/layout/picture_item.xml b/res/layout/picture_item.xml
index dc33d6c..54f5409 100644
--- a/res/layout/picture_item.xml
+++ b/res/layout/picture_item.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2013 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,17 +14,24 @@
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/picture"
- android:layout_width="@dimen/picture_size"
- android:layout_height="@dimen/picture_size"
- style="@style/PhotoPhase.Album.Picture">
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
- <ImageView android:id="@+id/picture_thumbnail"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="fitXY"
- android:background="@color/album_thumbnail_color"
- android:contentDescription="@null" />
+ <org.cyanogenmod.wallpapers.photophase.widgets.PictureItemView
+ android:id="@+id/picture"
+ android:layout_width="@dimen/picture_size"
+ android:layout_height="@dimen/picture_size"
+ style="@style/PhotoPhase.Album.Picture">
+
+ <ImageView android:id="@+id/picture_thumbnail"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="fitXY"
+ android:background="@color/album_thumbnail_color"
+ android:contentDescription="@null" />
+
+ </org.cyanogenmod.wallpapers.photophase.widgets.PictureItemView>
</FrameLayout>
diff --git a/res/layout/album.xml b/res/layout/pictures_view.xml
index 63aa9ad..141fde6 100644
--- a/res/layout/album.xml
+++ b/res/layout/pictures_view.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2013 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,19 +14,15 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<GridView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/album_pictures_view"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/small_margin">
-
- <include android:id="@+id/album_info"
- layout="@layout/album_info"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true" />
-
- <include android:id="@+id/album_pictures"
- layout="@layout/album_pictures"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true" />
-
-</RelativeLayout>
+ android:layout_height="match_parent"
+ android:persistentDrawingCache="animation|scrolling"
+ android:listSelector="@android:color/transparent"
+ android:divider="@android:color/transparent"
+ android:dividerHeight="@dimen/one_dp"
+ android:scrollbars="none"
+ android:layoutAnimation="@anim/pictures_layout_animation">
+</GridView>
diff --git a/res/layout/preference_widget_seekbar.xml b/res/layout/preference_widget_seekbar.xml
index 6aa0840..d1fdb1b 100644
--- a/res/layout/preference_widget_seekbar.xml
+++ b/res/layout/preference_widget_seekbar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2013 The Android Open Source Project
Copyright (C) 2013 The CyanogenMod Project
@@ -35,7 +35,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:minWidth="48dp"
- />
+ android:contentDescription="@null"/>
</LinearLayout>
<RelativeLayout
diff --git a/res/layout/preference_widget_seekbar_progress.xml b/res/layout/preference_widget_seekbar_progress.xml
index 531373b..d0035c1 100644
--- a/res/layout/preference_widget_seekbar_progress.xml
+++ b/res/layout/preference_widget_seekbar_progress.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
+<!--
Copyright (C) 2013 The Android Open Source Project
Copyright (C) 2013 The CyanogenMod Project