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/layout | |
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/layout')
-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 |
4 files changed, 135 insertions, 3 deletions
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" > |