summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJoey Rizzoli <joey@cyanogenmoditalia.it>2016-06-01 14:04:38 +0200
committerArne Coucheron <arco68@gmail.com>2017-07-31 00:38:16 +0200
commita0dc1b87de08a5462396a750baa77827ee14f754 (patch)
treef4f5d9f4dae0594f759fbec1618aebab952054af /res
parentae2d5c13ce7847275b35a82074b07cf67ab59cee (diff)
downloadandroid_packages_apps_Gallery2-a0dc1b87de08a5462396a750baa77827ee14f754.tar.gz
android_packages_apps_Gallery2-a0dc1b87de08a5462396a750baa77827ee14f754.tar.bz2
android_packages_apps_Gallery2-a0dc1b87de08a5462396a750baa77827ee14f754.zip
Gallery2: Replace hamburger menu with bottom bar
Change-Id: I20caa58fe11ee6f4148cb0bcb0ccbcdcf3a9612e Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>
Diffstat (limited to 'res')
-rw-r--r--res/drawable/ic_album.xml9
-rw-r--r--res/drawable/ic_timeline.xml14
-rw-r--r--res/drawable/ic_video.xml13
-rw-r--r--res/layout/gallery_main.xml69
-rw-r--r--res/layout/gl_root_group.xml12
-rw-r--r--res/values/attrs.xml10
-rw-r--r--res/values/cm_colors.xml7
-rw-r--r--res/values/codeaurora_strings.xml12
8 files changed, 76 insertions, 70 deletions
diff --git a/res/drawable/ic_album.xml b/res/drawable/ic_album.xml
new file mode 100644
index 000000000..3f0cfa2fb
--- /dev/null
+++ b/res/drawable/ic_album.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="@color/tab_icon_2"
+ android:pathData="M17.999,2h-12c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4C19.999,2.9 19.099,2 17.999,2zM5.999,4h5v8l-2.5,-1.5l-2.5,1.5V4zM5.999,19l3,-3.859l2.141,2.58l3,-3.861L17.999,19H5.999z"/>
+</vector>
diff --git a/res/drawable/ic_timeline.xml b/res/drawable/ic_timeline.xml
new file mode 100644
index 000000000..7c30ffa4e
--- /dev/null
+++ b/res/drawable/ic_timeline.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="@color/tab_icon_1"
+ android:pathData="M9.45605,12.4586 L16.2515,12.4586 L16.2515,19.7214 L9.45608,19.7214 Z M20,8 L4,8
+L4,6 L20,6 L20,8 Z M18,2 L6,2 L6,4 L18,4 L18,2 Z M22,12 L22,20
+C22,21.1,21.1,22,20,22 L4,22 C2.9,22,2,21.1,2,20 L2,12 C2,10.9,2.9,10,4,10
+L20,10 C21.1,10,22,10.9,22,12 Z M16,16 L10,12.73 L10,19.26 L16,16 Z" />
+</vector>
diff --git a/res/drawable/ic_video.xml b/res/drawable/ic_video.xml
new file mode 100644
index 000000000..1904d8b68
--- /dev/null
+++ b/res/drawable/ic_video.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="@color/tab_icon_3"
+ android:pathData="M18,4 L20,8 L17,8 L15,4 L13,4 L15,8 L12,8 L10,4 L8,4 L10,8 L7,8 L5,4 L4,4
+C2.9,4,2.01,4.9,2.01,6 L2,18 C2,19.1,2.9,20,4,20 L20,20 C21.1,20,22,19.1,22,18
+L22,4 L18,4 Z" />
+</vector>
diff --git a/res/layout/gallery_main.xml b/res/layout/gallery_main.xml
index 31d67c5ea..da9e76a8d 100644
--- a/res/layout/gallery_main.xml
+++ b/res/layout/gallery_main.xml
@@ -28,67 +28,36 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawerLayout"
+ android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" >
- <!-- MAIN CONTENT -->
-
<RelativeLayout
- android:id="@+id/gallery_root"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <include layout="@layout/gl_root_group" />
- </RelativeLayout>
-
- <LinearLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <include
- android:id="@+id/toolbar"
- layout="@layout/toolbar" />
- </LinearLayout>
-
- <RelativeLayout
- android:id="@+id/drawerPane"
- android:layout_width="270dp"
- android:layout_height="match_parent"
- android:layout_gravity="start"
- android:background="@color/white"
- android:clickable="true" >
-
- <!-- Header -->
+ android:layout_height="match_parent">
+ <!-- MAIN CONTENT -->
<RelativeLayout
- android:id="@+id/header"
+ android:id="@+id/gallery_root"
android:layout_width="match_parent"
- android:layout_height="150dp"
- android:background="@drawable/drawer_bg" >
+ android:layout_height="match_parent">
- <TextView
- android:id="@+id/appName"
- android:layout_width="wrap_content"
+ <com.aurelhubert.ahbottomnavigation.AHBottomNavigation
+ android:id="@+id/bottom_navigation"
+ android:elevation="8dp"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="16dp"
- android:layout_marginStart="16dp"
- android:fontFamily="sans-serif"
- android:text="@string/navigation_drawer_title"
- android:textColor="@color/white"
- android:textSize="24sp" />
+ android:layout_alignParentBottom="true" />
+
+ <include layout="@layout/gl_root_group"/>
</RelativeLayout>
- <ListView
- android:id="@+id/navList"
- android:layout_width="270dp"
- android:layout_height="match_parent"
- android:layout_below="@id/header"
- android:layout_marginTop="4dp"
- android:divider="@android:color/transparent" />
+ <!-- This layout will overlap all the others -->
+ <include
+ android:id="@+id/toolbar"
+ layout="@layout/toolbar" />
</RelativeLayout>
-
-</android.support.v4.widget.DrawerLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/res/layout/gl_root_group.xml b/res/layout/gl_root_group.xml
index de0f66afe..eee2b49f8 100644
--- a/res/layout/gl_root_group.xml
+++ b/res/layout/gl_root_group.xml
@@ -15,13 +15,19 @@
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <com.android.gallery3d.ui.GLRootView
+
+ <RelativeLayout
+ android:id="@+id/gl_parent_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginBottom="56dp">
+ <com.android.gallery3d.ui.GLRootView
android:id="@+id/gl_root_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
+ </RelativeLayout>
<View android:id="@+id/gl_root_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="#fafafa"
- />
+ android:background="#fafafa"/>
</merge>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 80079dd46..52ac78ff9 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -14,16 +14,11 @@
limitations under the License.
-->
<resources>
- <declare-styleable name="Theme.GalleryBase">
- <attr name="listPreferredItemHeightSmall" format="dimension" />
- <attr name="switchStyle" format="reference" />
- </declare-styleable>
+ <declare-styleable name="Theme.GalleryBase"/>
<!-- Camera resources below -->
- <declare-styleable name="CameraPreference">
- <attr name="title" format="string" />
- </declare-styleable>
+ <declare-styleable name="CameraPreference"/>
<declare-styleable name="ListPreference">
<attr name="key" format="string" />
<attr name="defaultValue" format="string|reference" />
@@ -44,7 +39,6 @@
</declare-styleable>
<declare-styleable name="Knob">
<attr name="label" format="string" />
- <attr name="background" format="integer" />
<attr name="foreground" format="integer" />
</declare-styleable>
<declare-styleable name="FillColor">
diff --git a/res/values/cm_colors.xml b/res/values/cm_colors.xml
index 70fc269a8..4eb65aead 100644
--- a/res/values/cm_colors.xml
+++ b/res/values/cm_colors.xml
@@ -24,6 +24,13 @@
<color name="light_black">#424242</color>
+ <color name="tab_1">@color/primary</color>
+ <color name="tab_2">@color/primary</color>
+ <color name="tab_3">@color/primary</color>
+ <color name="tab_icon_1">@color/white</color>
+ <color name="tab_icon_2">@color/white</color>
+ <color name="tab_icon_3">@color/white</color>
+
<color name="black_transparent_1">#1a000000</color>
<color name="black_transparent_2">#26000000</color>
<color name="black_transparent_3">#75000000</color>
diff --git a/res/values/codeaurora_strings.xml b/res/values/codeaurora_strings.xml
index b05aaf45c..540707e3a 100644
--- a/res/values/codeaurora_strings.xml
+++ b/res/values/codeaurora_strings.xml
@@ -122,19 +122,13 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<string name="drm_license_info">DRM license info</string>
- <string-array name="title_array_nav_items">
- <item>Timeline</item>
- <item>Albums</item>
- <item>Videos</item>
- </string-array>
-
- <string name="navigation_drawer_title" translatable="false">@string/app_name</string>
<!-- Timeline screen title -->
<string name="timeline_title">Timeline</string>
<!-- Albums screen title -->
- <string name="albums_title" translatable="false">@string/tab_albums</string>
+ <string name="albums_title">Albums</string>
<!-- Videos screen title -->
<string name="videos_title">Videos</string>
+
<string name="action_viewtype_list">List view</string>
<string name="action_viewtype_grid" translatable="false">@string/switch_photo_grid</string>
<string name="tvEmptyAlbum">No photos found</string>
@@ -144,7 +138,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<string name="text_makeup_Soften">Soften</string>
<string name="text_makeup_trimface">Trimface</string>
<string name="text_makeup_bigeye">Bigeye</string>
- <string name="drawer_desc" translatable="false">drawer</string>
+
<string name="truescanner_normal">Normal</string>
<string name="truescanner_white">Whiteboard</string>
<string name="truescanner">TrueScanner</string>