summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-07-16 11:11:32 -0700
committerWinson Chung <winsonc@google.com>2013-07-17 11:15:22 -0700
commitd2be381d36485059d0108ae89cfe57a30a7a8499 (patch)
tree105185b3b15aed3a1ea825a8f6f73e54a1c5fec2 /res
parentb5da44583957ffe9b0311074eeb77d33e753a9e5 (diff)
downloadandroid_packages_apps_Trebuchet-d2be381d36485059d0108ae89cfe57a30a7a8499.tar.gz
android_packages_apps_Trebuchet-d2be381d36485059d0108ae89cfe57a30a7a8499.tar.bz2
android_packages_apps_Trebuchet-d2be381d36485059d0108ae89cfe57a30a7a8499.zip
Removing old scroll indicator and adding page indicator dots.
Change-Id: I44c5b4b532e8464010d45dd0a3dfeccb2d475216
Diffstat (limited to 'res')
-rw-r--r--res/drawable-hdpi/active_page.pngbin0 -> 1295 bytes
-rw-r--r--res/drawable-hdpi/inactive_page.pngbin0 -> 1402 bytes
-rw-r--r--res/drawable-mdpi/active_page.pngbin0 -> 1186 bytes
-rw-r--r--res/drawable-mdpi/inactive_page.pngbin0 -> 1268 bytes
-rw-r--r--res/drawable-xhdpi/active_page.pngbin0 -> 1367 bytes
-rw-r--r--res/drawable-xhdpi/inactive_page.pngbin0 -> 1450 bytes
-rw-r--r--res/layout-land/launcher.xml19
-rw-r--r--res/layout-port/launcher.xml17
-rw-r--r--res/layout-sw600dp-land/launcher.xml108
-rw-r--r--res/layout-sw720dp/launcher.xml15
-rw-r--r--res/layout/apps_customize_pane.xml12
-rw-r--r--res/layout/page_indicator.xml20
-rw-r--r--res/layout/page_indicator_marker.xml34
-rw-r--r--res/values/attrs.xml2
-rw-r--r--res/values/dimens.xml4
15 files changed, 185 insertions, 46 deletions
diff --git a/res/drawable-hdpi/active_page.png b/res/drawable-hdpi/active_page.png
new file mode 100644
index 000000000..ce2d5b169
--- /dev/null
+++ b/res/drawable-hdpi/active_page.png
Binary files differ
diff --git a/res/drawable-hdpi/inactive_page.png b/res/drawable-hdpi/inactive_page.png
new file mode 100644
index 000000000..2186f519a
--- /dev/null
+++ b/res/drawable-hdpi/inactive_page.png
Binary files differ
diff --git a/res/drawable-mdpi/active_page.png b/res/drawable-mdpi/active_page.png
new file mode 100644
index 000000000..9e23eccb0
--- /dev/null
+++ b/res/drawable-mdpi/active_page.png
Binary files differ
diff --git a/res/drawable-mdpi/inactive_page.png b/res/drawable-mdpi/inactive_page.png
new file mode 100644
index 000000000..9468a62ed
--- /dev/null
+++ b/res/drawable-mdpi/inactive_page.png
Binary files differ
diff --git a/res/drawable-xhdpi/active_page.png b/res/drawable-xhdpi/active_page.png
new file mode 100644
index 000000000..c43e67c40
--- /dev/null
+++ b/res/drawable-xhdpi/active_page.png
Binary files differ
diff --git a/res/drawable-xhdpi/inactive_page.png b/res/drawable-xhdpi/inactive_page.png
new file mode 100644
index 000000000..ae3f9885b
--- /dev/null
+++ b/res/drawable-xhdpi/inactive_page.png
Binary files differ
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 6dfbf21a5..8ee1413ee 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -45,9 +45,7 @@
launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
launcher:scrollIndicatorPaddingLeft="@dimen/qsb_bar_height"
- launcher:scrollIndicatorPaddingRight="@dimen/button_bar_height">
-
- </com.android.launcher3.Workspace>
+ launcher:scrollIndicatorPaddingRight="@dimen/button_bar_height" />
<include
android:id="@+id/qsb_divider"
@@ -57,21 +55,6 @@
android:layout_marginStart="@dimen/qsb_bar_height"
android:layout_gravity="start" />
- <include
- android:id="@+id/dock_divider"
- layout="@layout/workspace_divider"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginEnd="@dimen/button_bar_height"
- android:layout_gravity="end" />
-
- <include
- android:id="@+id/paged_view_indicator"
- layout="@layout/scroll_indicator"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom" />
-
<include layout="@layout/hotseat"
android:id="@+id/hotseat"
android:layout_width="@dimen/button_bar_height_plus_padding"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 30eba1c7d..0fee045fc 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -33,20 +33,12 @@
<!-- Keep these behind the workspace so that they are not visible when
we go into AllApps -->
<include
- android:id="@+id/dock_divider"
- layout="@layout/workspace_divider"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/button_bar_height"
- android:layout_gravity="bottom" />
-
- <include
- android:id="@+id/paged_view_indicator"
- layout="@layout/scroll_indicator"
+ android:id="@+id/page_indicator"
+ layout="@layout/page_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:layout_marginBottom="@dimen/button_bar_height" />
+ android:layout_gravity="bottom|center_horizontal"
+ android:layout_marginBottom="@dimen/button_bar_height_plus_padding" />
<!-- The workspace contains 5 screens of cells -->
<com.android.launcher3.Workspace
@@ -62,6 +54,7 @@
launcher:cellCountX="@integer/cell_count_x"
launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
+ launcher:pageIndicator="@id/page_indicator"
launcher:scrollIndicatorPaddingLeft="@dimen/workspace_divider_padding_left"
launcher:scrollIndicatorPaddingRight="@dimen/workspace_divider_padding_right">
</com.android.launcher3.Workspace>
diff --git a/res/layout-sw600dp-land/launcher.xml b/res/layout-sw600dp-land/launcher.xml
new file mode 100644
index 000000000..8e45028b8
--- /dev/null
+++ b/res/layout-sw600dp-land/launcher.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source 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.
+-->
+
+<!-- Full screen view projects under the status bar and contains the background -->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
+
+ android:id="@+id/launcher"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/workspace_bg">
+
+ <com.android.launcher3.DragLayer
+ android:id="@+id/drag_layer"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
+
+ <include
+ android:id="@+id/page_indicator"
+ layout="@layout/page_indicator"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom|center_horizontal" />
+
+ <!-- The workspace contains 5 screens of cells -->
+ <com.android.launcher3.Workspace
+ android:id="@+id/workspace"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:paddingStart="@dimen/workspace_left_padding"
+ android:paddingEnd="@dimen/workspace_right_padding"
+ android:paddingTop="@dimen/workspace_top_padding"
+ android:paddingBottom="@dimen/workspace_bottom_padding"
+ launcher:defaultScreen="@integer/config_workspaceDefaultScreen"
+ launcher:cellCountX="@integer/cell_count_x"
+ launcher:cellCountY="@integer/cell_count_y"
+ launcher:pageSpacing="@dimen/workspace_page_spacing"
+ launcher:pageIndicator="@id/page_indicator"
+ launcher:scrollIndicatorPaddingLeft="@dimen/qsb_bar_height"
+ launcher:scrollIndicatorPaddingRight="@dimen/button_bar_height" />
+
+ <include
+ android:id="@+id/qsb_divider"
+ layout="@layout/workspace_divider"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginStart="@dimen/qsb_bar_height"
+ android:layout_gravity="start" />
+
+ <include layout="@layout/hotseat"
+ android:id="@+id/hotseat"
+ android:layout_width="@dimen/button_bar_height_plus_padding"
+ android:layout_height="match_parent"
+ android:layout_gravity="end" />
+
+ <include
+ android:id="@+id/qsb_bar"
+ layout="@layout/qsb_bar" />
+
+ <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure
+ that it is still visible during the transition to AllApps and doesn't overlay on
+ top of that view. -->
+ <include layout="@layout/workspace_cling"
+ android:id="@+id/workspace_cling"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone" />
+
+ <include layout="@layout/folder_cling"
+ android:id="@+id/folder_cling"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone" />
+
+ <com.android.launcher3.DrawableStateProxyView
+ android:id="@+id/voice_button_proxy"
+ android:layout_width="@dimen/qsb_bar_height"
+ android:layout_height="@dimen/app_icon_size"
+ android:layout_gravity="top|start"
+ android:layout_marginTop="64dp"
+ android:clickable="true"
+ android:onClick="onClickVoiceButton"
+ android:importantForAccessibility="no"
+ launcher:sourceViewId="@+id/voice_button" />
+
+ <include layout="@layout/apps_customize_pane"
+ android:id="@+id/apps_customize_pane"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="invisible" />
+ </com.android.launcher3.DragLayer>
+</FrameLayout>
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index dff3b2641..852d1ec21 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -33,19 +33,11 @@
<!-- Keep these behind the workspace so that they are not visible when
we go into AllApps -->
<include
- android:id="@+id/dock_divider"
- layout="@layout/workspace_divider"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/button_bar_height_plus_padding"
- android:layout_gravity="bottom|center_horizontal" />
-
- <include
- android:id="@+id/paged_view_indicator"
- layout="@layout/scroll_indicator"
+ android:id="@+id/page_indicator"
+ layout="@layout/page_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="bottom"
+ android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="@dimen/button_bar_height_plus_padding" />
<!-- The workspace contains 5 screens of cells -->
@@ -62,6 +54,7 @@
launcher:cellCountX="@integer/cell_count_x"
launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
+ launcher:pageIndicator="@id/page_indicator"
launcher:scrollIndicatorPaddingLeft="@dimen/workspace_divider_padding_left"
launcher:scrollIndicatorPaddingRight="@dimen/workspace_divider_padding_right">
</com.android.launcher3.Workspace>
diff --git a/res/layout/apps_customize_pane.xml b/res/layout/apps_customize_pane.xml
index 7efe48638..c64b7cead 100644
--- a/res/layout/apps_customize_pane.xml
+++ b/res/layout/apps_customize_pane.xml
@@ -55,6 +55,7 @@
android:id="@+id/apps_customize_pane_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:layout_marginBottom="@dimen/apps_customize_page_indicator_height"
android:layout_gravity="center"
launcher:maxAppCellCountX="@integer/apps_customize_maxCellCountX"
launcher:maxAppCellCountY="@integer/apps_customize_maxCellCountY"
@@ -70,20 +71,21 @@
launcher:widgetCountY="@integer/apps_customize_widget_cell_count_y"
launcher:clingFocusedX="@integer/apps_customize_cling_focused_x"
launcher:clingFocusedY="@integer/apps_customize_cling_focused_y"
- launcher:maxGap="@dimen/workspace_max_gap" />
+ launcher:maxGap="@dimen/workspace_max_gap"
+ launcher:pageIndicator="@+id/page_indicator" />
<FrameLayout
android:id="@+id/animation_buffer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF000000"
android:visibility="gone" />
-
<include
- android:id="@+id/paged_view_indicator"
- layout="@layout/scroll_indicator"
+ android:id="@+id/page_indicator"
+ layout="@layout/page_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="bottom" />
+ android:layout_gravity="bottom|center_horizontal"
+ android:layout_marginBottom="@dimen/apps_customize_page_indicator_margin" />
</FrameLayout>
</LinearLayout>
diff --git a/res/layout/page_indicator.xml b/res/layout/page_indicator.xml
new file mode 100644
index 000000000..8aae752c5
--- /dev/null
+++ b/res/layout/page_indicator.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source 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.
+-->
+<com.android.launcher3.PageIndicator
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
+ android:animateLayoutChanges="true">
+</com.android.launcher3.PageIndicator>
diff --git a/res/layout/page_indicator_marker.xml b/res/layout/page_indicator_marker.xml
new file mode 100644
index 000000000..0260e7e4e
--- /dev/null
+++ b/res/layout/page_indicator_marker.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source 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.
+-->
+<com.android.launcher3.PageIndicatorMarker
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <ImageView
+ android:id="@+id/inactive"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/inactive_page"
+ />
+ <ImageView
+ android:id="@+id/active"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/active_page"
+ android:alpha="0"
+ />
+</com.android.launcher3.PageIndicatorMarker>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 0c37e3ce9..154508379 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -97,6 +97,8 @@
<attr name="pageLayoutPaddingRight" format="dimension" />
<!-- The space between adjacent pages of the PagedView. -->
<attr name="pageSpacing" format="dimension" />
+ <!-- The page indicator for this workspace -->
+ <attr name="pageIndicator" format="reference" />
<!-- The padding for the scroll indicator area -->
<attr name="scrollIndicatorPaddingLeft" format="dimension" />
<attr name="scrollIndicatorPaddingRight" format="dimension" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 3fe53d274..2bfb31cc7 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -77,6 +77,10 @@
<dimen name="apps_customize_widget_cell_width_gap">10dp</dimen>
<dimen name="apps_customize_widget_cell_height_gap">8dp</dimen>
+ <!-- The AppsCustomize page indicator -->
+ <dimen name="apps_customize_page_indicator_height">12dp</dimen>
+ <dimen name="apps_customize_page_indicator_margin">4dp</dimen>
+
<!-- height of the bottom row of controls -->
<dimen name="button_bar_height">62dip</dimen>
<!-- Because portal animations go beyond the bounds of an icon, we need