Merge "Updated margins and spacing of preferences for watch type devices." into nyc-mr1-dev

This commit is contained in:
Michael Kwan
2016-07-08 20:44:24 +00:00
committed by Android (Google) Code Review
7 changed files with 126 additions and 27 deletions

View File

@@ -29,34 +29,42 @@
<LinearLayout
android:id="@+id/icon_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="-4dp"
android:minWidth="32dp"
android:gravity="start|center_vertical"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:orientation="horizontal"
android:paddingEnd="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp">
android:layout_marginEnd="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp">
<com.android.internal.widget.PreferenceImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="24dp"
android:maxHeight="24dp" />
android:maxWidth="40dp"
android:maxHeight="40dp" />
</LinearLayout>
<!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@+id/widget_frame"
android:layout_width="40dp"
android:layout_height="40dp"
android:gravity="center"
android:orientation="horizontal"
android:layout_marginEnd="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="16dp"
android:paddingBottom="16dp">
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp">
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:maxLines="3"
android:textAppearance="?attr/textAppearanceListItem"
android:ellipsize="end" />
@@ -70,13 +78,4 @@
android:maxLines="10" />
</RelativeLayout>
<!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@+id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="end|center_vertical"
android:paddingStart="4dp"
android:orientation="vertical" />
</LinearLayout>

View File

@@ -14,10 +14,10 @@
limitations under the License.
-->
<resources>
<dimen name="dialog_padding_material">32dp</dimen>
<dimen name="preference_fragment_padding_vertical_material">22dp</dimen>
<dimen name="dialog_padding_material">@dimen/screen_percentage_15</dimen>
<dimen name="preference_fragment_padding_vertical_material">@dimen/screen_percentage_15</dimen>
<dimen name="list_item_padding_horizontal_material">32dp</dimen>
<dimen name="list_item_padding_start_material">40dp</dimen>
<dimen name="list_item_padding_end_material">24dp</dimen>
<dimen name="list_item_padding_horizontal_material">@dimen/screen_percentage_15</dimen>
<dimen name="list_item_padding_start_material">@dimen/screen_percentage_15</dimen>
<dimen name="list_item_padding_end_material">@dimen/screen_percentage_10</dimen>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<resources>
<dimen name="screen_percentage_05">9.7dp</dimen>
<dimen name="screen_percentage_10">19.4dp</dimen>
<dimen name="screen_percentage_15">29.1dp</dimen>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<resources>
<dimen name="screen_percentage_05">10.25dp</dimen>
<dimen name="screen_percentage_10">20.5dp</dimen>
<dimen name="screen_percentage_15">30.75dp</dimen>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<resources>
<dimen name="screen_percentage_05">10.65dp</dimen>
<dimen name="screen_percentage_10">21.3dp</dimen>
<dimen name="screen_percentage_15">31.95dp</dimen>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<resources>
<dimen name="screen_percentage_05">11.4dp</dimen>
<dimen name="screen_percentage_10">22.8dp</dimen>
<dimen name="screen_percentage_15">34.2dp</dimen>
</resources>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<resources>
<dimen name="screen_percentage_05">12dp</dimen>
<dimen name="screen_percentage_10">24dp</dimen>
<dimen name="screen_percentage_15">36dp</dimen>
</resources>