diff options
author | Yvonne Wong <ywong@cyngn.com> | 2015-12-01 17:04:07 -0800 |
---|---|---|
committer | Yvonne Wong <ywong@cyngn.com> | 2015-12-03 02:05:08 -0800 |
commit | 4cc0018c15a8cf2ab58f00929de6a5bd034ddb86 (patch) | |
tree | e3c93e83b158855fcb86259a7b489916702ed070 /res | |
parent | 95dfdf845c3accc749609d8b955d55fc8df5adf1 (diff) | |
download | android_packages_apps_Trebuchet-4cc0018c15a8cf2ab58f00929de6a5bd034ddb86.tar.gz android_packages_apps_Trebuchet-4cc0018c15a8cf2ab58f00929de6a5bd034ddb86.tar.bz2 android_packages_apps_Trebuchet-4cc0018c15a8cf2ab58f00929de6a5bd034ddb86.zip |
Reimplement CM Settings Overview Panel Part 3
- Enable dynamic grid resizing
Change-Id: I95a7f20da48e037a94ce5b6191c5597490d91d9d
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/ic_navigation_next.xml | 28 | ||||
-rw-r--r-- | res/drawable/ic_navigation_prev.xml | 28 | ||||
-rw-r--r-- | res/drawable/listitem_bg.xml | 2 | ||||
-rw-r--r-- | res/drawable/listitem_text.xml | 2 | ||||
-rw-r--r-- | res/layout-land/launcher.xml | 2 | ||||
-rw-r--r-- | res/layout/custom_grid_size_dialog.xml | 48 | ||||
-rw-r--r-- | res/layout/dynamic_grid_size_screen.xml | 69 | ||||
-rw-r--r-- | res/layout/overview_panel.xml | 4 | ||||
-rw-r--r-- | res/layout/settings_pane_list_header.xml | 17 | ||||
-rw-r--r-- | res/values/cm_strings.xml | 3 | ||||
-rw-r--r-- | res/values/colors.xml | 7 | ||||
-rw-r--r-- | res/values/dimens.xml | 3 |
12 files changed, 206 insertions, 7 deletions
diff --git a/res/drawable/ic_navigation_next.xml b/res/drawable/ic_navigation_next.xml new file mode 100644 index 000000000..571280bb9 --- /dev/null +++ b/res/drawable/ic_navigation_next.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 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. +--> +<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="#FFFFFF" + android:pathData="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" /> + <path + android:pathData="M0 0h24v24H0z" /> +</vector>
\ No newline at end of file diff --git a/res/drawable/ic_navigation_prev.xml b/res/drawable/ic_navigation_prev.xml new file mode 100644 index 000000000..f0a6a3b32 --- /dev/null +++ b/res/drawable/ic_navigation_prev.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 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. +--> +<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="#FFFFFF" + android:pathData="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" /> + <path + android:pathData="M0 0h24v24H0z" /> +</vector>
\ No newline at end of file diff --git a/res/drawable/listitem_bg.xml b/res/drawable/listitem_bg.xml index 1a1e93d53..55dbfcf27 100644 --- a/res/drawable/listitem_bg.xml +++ b/res/drawable/listitem_bg.xml @@ -16,6 +16,6 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_enabled="true" - android:state_pressed="true" android:drawable="@android:color/white" /> + android:state_pressed="true" android:drawable="@android:color/white" /> <item android:drawable="@color/settings_bg_color" /> </selector> diff --git a/res/drawable/listitem_text.xml b/res/drawable/listitem_text.xml index 9637fd308..d6c2503a6 100644 --- a/res/drawable/listitem_text.xml +++ b/res/drawable/listitem_text.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_enabled="true" - android:state_pressed="true" android:color="@color/slideup_panel_bg_color" /> + android:state_pressed="true" android:color="@color/settings_bg_color" /> <item android:color="@android:color/white" /> </selector> diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml index 3a93365a7..3fe6f893d 100644 --- a/res/layout-land/launcher.xml +++ b/res/layout-land/launcher.xml @@ -18,6 +18,7 @@ <com.android.launcher3.LauncherRootView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res-auto" + xmlns:insettable="http://schemas.android.com/apk/res-auto" android:id="@+id/launcher" android:layout_width="match_parent" android:layout_height="match_parent" @@ -30,6 +31,7 @@ android:layout_height="match_parent" android:visibility="invisible" android:alpha="1.0" + insettable:layout_ignoreInsets="true" android:clipToPadding="false"> <ImageView diff --git a/res/layout/custom_grid_size_dialog.xml b/res/layout/custom_grid_size_dialog.xml new file mode 100644 index 000000000..59a5db484 --- /dev/null +++ b/res/layout/custom_grid_size_dialog.xml @@ -0,0 +1,48 @@ +<!-- + Copyright (C) 2015 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. +--> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" > + + <LinearLayout + android:id="@+id/grid_number_pickers" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:orientation="horizontal"> + + <NumberPicker + android:id="@+id/custom_rows" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="@dimen/dialog_padding"/> + + <NumberPicker + android:id="@+id/custom_columns" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/dialog_padding"/> + + </LinearLayout> + + <Button + android:id="@+id/dialog_confirm_button" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/dialog_confirm" + android:layout_below="@id/grid_number_pickers" + android:layout_marginTop="@dimen/dialog_padding"/> +</RelativeLayout>
\ No newline at end of file diff --git a/res/layout/dynamic_grid_size_screen.xml b/res/layout/dynamic_grid_size_screen.xml new file mode 100644 index 000000000..85dc992fb --- /dev/null +++ b/res/layout/dynamic_grid_size_screen.xml @@ -0,0 +1,69 @@ +<!-- + Copyright (C) 2015 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. +--> +<com.android.launcher3.InsettableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:insettable="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center_horizontal|bottom" + android:background="@color/settings_bg_color" + android:orientation="vertical" + android:clickable="true" > + + <LinearLayout + android:id="@+id/dynamic_grid_title" + insettable:layout_ignoreBottomInsets="true" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:background="@drawable/listitem_bg" + android:clickable="true" > + + <ImageView + android:id="@+id/nav_prev" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:adjustViewBounds="true" + android:src="@drawable/ic_navigation_prev" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/grid_size_text" + android:textAllCaps="true" + android:fontFamily="sans-serif-condensed" + android:textColor="@drawable/listitem_text" + android:layout_gravity="center_vertical" + android:textSize="16sp" /> + </LinearLayout> + + <view + insettable:layout_ignoreInsets="true" + class="com.android.launcher3.DynamicGridSizeFragment$GridSizeView" + android:id="@+id/dynamic_grid_size_image" + android:layout_width="150dp" + android:layout_height="150dp" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="@dimen/grid_padding"/> + + <ListView + insettable:layout_ignoreTopInsets="true" + android:id="@+id/dynamic_grid_list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:listSelector="@android:color/transparent" + android:splitMotionEvents="false"/> +</com.android.launcher3.InsettableLinearLayout> diff --git a/res/layout/overview_panel.xml b/res/layout/overview_panel.xml index 5698c86a9..636e36b89 100644 --- a/res/layout/overview_panel.xml +++ b/res/layout/overview_panel.xml @@ -28,7 +28,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" - android:background="@color/slideup_panel_bg_color" + android:background="@color/settings_bg_color" android:paddingTop="@dimen/overview_panel_top_padding" > <ImageView @@ -45,7 +45,7 @@ <FrameLayout android:orientation="vertical" android:layout_width="match_parent" - android:background="@color/slideup_panel_bg_color" + android:background="@color/settings_bg_color" android:layout_height="match_parent" > <LinearLayout diff --git a/res/layout/settings_pane_list_header.xml b/res/layout/settings_pane_list_header.xml index 2429b9b81..a7d04e36e 100644 --- a/res/layout/settings_pane_list_header.xml +++ b/res/layout/settings_pane_list_header.xml @@ -1,8 +1,23 @@ +<!-- + Copyright (C) 2015 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. +--> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|bottom" - android:background="@color/slideup_panel_bg_color" + android:background="@color/settings_bg_color" android:paddingLeft="@dimen/overview_panel_list_padding" android:paddingRight="@dimen/overview_panel_list_padding" android:orientation="horizontal" > diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index e31fed119..9072824ce 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -43,6 +43,9 @@ <string name="grid_size_custom">Custom (<xliff:g id="rows">%1$d</xliff:g> \u00d7 <xliff:g id="columns">%2$d</xliff:g>)</string> <string name="preferences_interface_homescreen_custom">Select custom size</string> + <!-- Dialog --> + <string name="dialog_confirm">Confirm</string> + <!-- Home screen search bar --> <string name="home_screen_search_text">Search bar</string> diff --git a/res/values/colors.xml b/res/values/colors.xml index 80c0d6f6d..1b8962170 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -36,7 +36,6 @@ <color name="quantum_panel_text_color_dark">#FFF</color> <color name="quantum_panel_bg_color">#FFF5F5F5</color> <color name="quantum_panel_bg_color_dark">#76000000</color> - <color name="slideup_panel_bg_color">#FF374248</color> <color name="outline_color">#FFFFFFFF</color> @@ -61,7 +60,11 @@ <color name="widgets_cell_color">#263238</color> <!-- CM Settings --> - <color name="settings_header_text">#FF6cd2ea</color> + <color name="settings_bg_color">#424242</color> + <color name="settings_header_text">#00B1E5</color> + + <color name="dynamic_grid_preview_background">#FFFFFFFF</color> + <color name="dynamic_grid_preview_foreground">#FF000000</color> <color name="app_scrubber_highlight_color">@android:color/white</color> <color name="app_scrubber_gray_color">@android:color/darker_gray</color> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 95557d9c5..d73bd33db 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -28,6 +28,9 @@ <dimen name="dynamic_grid_overview_max_icon_zone_height">120dp</dimen> <dimen name="dynamic_grid_overview_bar_item_width">80dp</dimen> <dimen name="dynamic_grid_overview_bar_spacer_width">20dp</dimen> + <dimen name="dialog_padding">10dp</dimen> + <dimen name="grid_padding">15dp</dimen> + <dimen name="grid_custom_text">50dp</dimen> <!-- App Widget resize frame --> <dimen name="default_widget_padding">8dp</dimen> |