Merge "Update Dashboard layout - part 2"
This commit is contained in:
committed by
Android (Google) Code Review
commit
f65f0e7575
74
res/layout-sw600dp/dashboard_tile.xml
Normal file
74
res/layout-sw600dp/dashboard_tile.xml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2014 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="@dimen/dashboard_tile_minimum_height">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/icon"
|
||||||
|
android:layout_width="@dimen/dashboard_tile_image_size"
|
||||||
|
android:layout_height="@dimen/dashboard_tile_image_size"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:layout_marginStart="@dimen/dashboard_tile_image_margin_start"
|
||||||
|
android:layout_marginEnd="@dimen/dashboard_tile_image_margin_end" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.TileTitle"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:fadingEdge="horizontal" />
|
||||||
|
|
||||||
|
<TextView android:id="@+id/status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/title"
|
||||||
|
android:layout_alignStart="@android:id/title"
|
||||||
|
android:textAppearance="@style/TextAppearance.Small"
|
||||||
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View android:id="@+id/tile_divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?android:attr/dividerVertical" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@@ -19,6 +19,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scrollbarStyle="outsideOverlay"
|
android:scrollbarStyle="outsideOverlay"
|
||||||
|
android:paddingStart="@dimen/dashboard_side_margin"
|
||||||
|
android:paddingEnd="@dimen/dashboard_side_margin"
|
||||||
|
android:clipToPadding="false"
|
||||||
android:background="@color/dashboard_background_color">
|
android:background="@color/dashboard_background_color">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
android:id="@+id/category"
|
android:id="@+id/category"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/dashboard_category_padding_start"
|
||||||
|
android:paddingEnd="@dimen/dashboard_category_padding_end"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@android:color/white"
|
android:background="@android:color/white"
|
||||||
android:layout_marginBottom="8dip"
|
android:layout_marginBottom="8dip"
|
||||||
|
@@ -20,7 +20,8 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent">
|
android:layout_width="match_parent"
|
||||||
|
android:background="@color/dashboard_background_color">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
android:id="@+id/prefs"
|
android:id="@+id/prefs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/white"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -25,16 +25,23 @@
|
|||||||
|
|
||||||
<dimen name="captioning_preview_height">100dp</dimen>
|
<dimen name="captioning_preview_height">100dp</dimen>
|
||||||
|
|
||||||
|
<!-- ActionBar height -->
|
||||||
|
<dimen name="actionbar_size">46dip</dimen>
|
||||||
|
|
||||||
<!-- Dashboard margins between each tiles within the layout -->
|
<!-- Dashboard margins between each tiles within the layout -->
|
||||||
<dimen name="dashboard_cell_gap_x">8dp</dimen>
|
<dimen name="dashboard_cell_gap_x">8dp</dimen>
|
||||||
<dimen name="dashboard_cell_gap_y">0dp</dimen>
|
<dimen name="dashboard_cell_gap_y">0dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard padding in its container -->
|
<!-- Dashboard padding in its container -->
|
||||||
<dimen name="dashboard_padding_start">4dp</dimen>
|
<dimen name="dashboard_padding_start">0dp</dimen>
|
||||||
<dimen name="dashboard_padding_end">4dp</dimen>
|
<dimen name="dashboard_padding_end">0dp</dimen>
|
||||||
<dimen name="dashboard_padding_top">4dp</dimen>
|
<dimen name="dashboard_padding_top">0dp</dimen>
|
||||||
<dimen name="dashboard_padding_bottom">0dp</dimen>
|
<dimen name="dashboard_padding_bottom">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard category padding start / end -->
|
||||||
|
<dimen name="dashboard_category_padding_start">4dp</dimen>
|
||||||
|
<dimen name="dashboard_category_padding_end">4dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard category title margin start -->
|
<!-- Dashboard category title margin start -->
|
||||||
<dimen name="dashboard_category_title_margin_start">12dp</dimen>
|
<dimen name="dashboard_category_title_margin_start">12dp</dimen>
|
||||||
|
|
||||||
|
@@ -39,15 +39,31 @@
|
|||||||
<dimen name="keyguard_appwidget_picker_margin_right">2dip</dimen>
|
<dimen name="keyguard_appwidget_picker_margin_right">2dip</dimen>
|
||||||
<integer name="keyguard_appwidget_picker_cols">2</integer>
|
<integer name="keyguard_appwidget_picker_cols">2</integer>
|
||||||
|
|
||||||
|
<dimen name="settings_side_margin">8dip</dimen>
|
||||||
|
|
||||||
<!-- ActionBar contentInsetStart -->
|
<!-- ActionBar contentInsetStart -->
|
||||||
<dimen name="actionbar_contentInsetStart">24dp</dimen>
|
<dimen name="actionbar_contentInsetStart">24dp</dimen>
|
||||||
<dimen name="actionbar_subsettings_contentInsetStart">80dp</dimen>
|
<dimen name="actionbar_subsettings_contentInsetStart">80dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard margins between each tiles within the layout -->
|
||||||
|
<dimen name="dashboard_cell_gap_x">16dp</dimen>
|
||||||
|
<dimen name="dashboard_cell_gap_y">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard padding in its container -->
|
||||||
|
<dimen name="dashboard_padding_start">0dp</dimen>
|
||||||
|
<dimen name="dashboard_padding_end">0dp</dimen>
|
||||||
|
<dimen name="dashboard_padding_top">0dp</dimen>
|
||||||
|
<dimen name="dashboard_padding_bottom">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard category padding start / end -->
|
||||||
|
<dimen name="dashboard_category_padding_start">16dp</dimen>
|
||||||
|
<dimen name="dashboard_category_padding_end">24dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard category title margin start -->
|
<!-- Dashboard category title margin start -->
|
||||||
<dimen name="dashboard_category_title_margin_start">23dp</dimen>
|
<dimen name="dashboard_category_title_margin_start">8dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard tile image padding start / end -->
|
<!-- Dashboard tile image padding start / end -->
|
||||||
<dimen name="dashboard_tile_image_margin_start">24dp</dimen>
|
<dimen name="dashboard_tile_image_margin_start">8dp</dimen>
|
||||||
<dimen name="dashboard_tile_image_margin_end">32dp</dimen>
|
<dimen name="dashboard_tile_image_margin_end">32dp</dimen>
|
||||||
|
|
||||||
<!-- SwitchBar margin start / end -->
|
<!-- SwitchBar margin start / end -->
|
||||||
|
@@ -15,5 +15,17 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="settings_side_margin">150dp</dimen>
|
<dimen name="settings_side_margin">112dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard side margins (left and right) -->
|
||||||
|
<dimen name="dashboard_side_margin">128dp</dimen>
|
||||||
|
|
||||||
|
<!-- ActionBar contentInsetStart -->
|
||||||
|
<dimen name="actionbar_contentInsetStart">128dp</dimen>
|
||||||
|
<dimen name="actionbar_subsettings_contentInsetStart">128dp</dimen>
|
||||||
|
|
||||||
|
<!-- SwitchBar sub settings margin start / end -->
|
||||||
|
<dimen name="switchbar_subsettings_margin_start">128dp</dimen>
|
||||||
|
<dimen name="switchbar_subsettings_margin_end">128dp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -19,10 +19,40 @@
|
|||||||
<dimen name="appwidget_preview_height">80dip</dimen>
|
<dimen name="appwidget_preview_height">80dip</dimen>
|
||||||
<integer name="keyguard_appwidget_picker_cols">2</integer>
|
<integer name="keyguard_appwidget_picker_cols">2</integer>
|
||||||
<dimen name="keyguard_appwidget_picker_width">720dip</dimen>
|
<dimen name="keyguard_appwidget_picker_width">720dip</dimen>
|
||||||
<dimen name="settings_side_margin">32dp</dimen>
|
|
||||||
|
<dimen name="settings_side_margin">64dp</dimen>
|
||||||
|
|
||||||
<!-- Weight of the left pane in a multi-pane preference layout. -->
|
<!-- Weight of the left pane in a multi-pane preference layout. -->
|
||||||
<integer name="preferences_left_pane_weight">1</integer>
|
<integer name="preferences_left_pane_weight">1</integer>
|
||||||
<!-- Weight of the right pane in a multi-pane preference layout. So the split is 1:2 -->
|
<!-- Weight of the right pane in a multi-pane preference layout. So the split is 1:2 -->
|
||||||
<integer name="preferences_right_pane_weight">2</integer>
|
<integer name="preferences_right_pane_weight">2</integer>
|
||||||
|
|
||||||
|
<!-- ActionBar height -->
|
||||||
|
<dimen name="actionbar_size">64dip</dimen>
|
||||||
|
|
||||||
|
<!-- ActionBar contentInsetStart -->
|
||||||
|
<dimen name="actionbar_contentInsetStart">80dp</dimen>
|
||||||
|
<dimen name="actionbar_subsettings_contentInsetStart">80dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard side margins (left and right) -->
|
||||||
|
<dimen name="dashboard_side_margin">80dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard margins between each tiles within the layout -->
|
||||||
|
<dimen name="dashboard_cell_gap_x">24dp</dimen>
|
||||||
|
<dimen name="dashboard_cell_gap_y">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard padding in its container -->
|
||||||
|
<dimen name="dashboard_padding_start">0dp</dimen>
|
||||||
|
<dimen name="dashboard_padding_end">0dp</dimen>
|
||||||
|
<dimen name="dashboard_padding_top">0dp</dimen>
|
||||||
|
<dimen name="dashboard_padding_bottom">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard category padding start / end -->
|
||||||
|
<dimen name="dashboard_category_padding_start">24dp</dimen>
|
||||||
|
<dimen name="dashboard_category_padding_end">24dp</dimen>
|
||||||
|
|
||||||
|
<!-- SwitchBar sub settings margin start / end -->
|
||||||
|
<dimen name="switchbar_subsettings_margin_start">80dp</dimen>
|
||||||
|
<dimen name="switchbar_subsettings_margin_end">80dp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -90,20 +90,30 @@
|
|||||||
<!-- Default text size for caption preview samples. Uses dp rather than sp because captions are not scaled. -->
|
<!-- Default text size for caption preview samples. Uses dp rather than sp because captions are not scaled. -->
|
||||||
<dimen name="caption_preview_text_size">48dp</dimen>
|
<dimen name="caption_preview_text_size">48dp</dimen>
|
||||||
|
|
||||||
|
<!-- ActionBar height -->
|
||||||
|
<dimen name="actionbar_size">56dip</dimen>
|
||||||
|
|
||||||
<!-- ActionBar contentInsetStart -->
|
<!-- ActionBar contentInsetStart -->
|
||||||
<dimen name="actionbar_contentInsetStart">16dp</dimen>
|
<dimen name="actionbar_contentInsetStart">16dp</dimen>
|
||||||
<dimen name="actionbar_subsettings_contentInsetStart">72dp</dimen>
|
<dimen name="actionbar_subsettings_contentInsetStart">72dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard side margins (left and right) -->
|
||||||
|
<dimen name="dashboard_side_margin">0dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard margins between each tiles within the layout -->
|
<!-- Dashboard margins between each tiles within the layout -->
|
||||||
<dimen name="dashboard_cell_gap_x">0dp</dimen>
|
<dimen name="dashboard_cell_gap_x">0dp</dimen>
|
||||||
<dimen name="dashboard_cell_gap_y">0dp</dimen>
|
<dimen name="dashboard_cell_gap_y">0dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard padding in its container -->
|
<!-- Dashboard padding in its container -->
|
||||||
<dimen name="dashboard_padding_start">4dp</dimen>
|
<dimen name="dashboard_padding_start">0dp</dimen>
|
||||||
<dimen name="dashboard_padding_end">4dp</dimen>
|
<dimen name="dashboard_padding_end">0dp</dimen>
|
||||||
<dimen name="dashboard_padding_top">4dp</dimen>
|
<dimen name="dashboard_padding_top">0dp</dimen>
|
||||||
<dimen name="dashboard_padding_bottom">0dp</dimen>
|
<dimen name="dashboard_padding_bottom">0dp</dimen>
|
||||||
|
|
||||||
|
<!-- Dashboard category padding start / end -->
|
||||||
|
<dimen name="dashboard_category_padding_start">0dp</dimen>
|
||||||
|
<dimen name="dashboard_category_padding_end">0dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard category panel elevation -->
|
<!-- Dashboard category panel elevation -->
|
||||||
<dimen name="dashboard_category_elevation">4dp</dimen>
|
<dimen name="dashboard_category_elevation">4dp</dimen>
|
||||||
|
|
||||||
@@ -111,7 +121,7 @@
|
|||||||
<dimen name="dashboard_category_title_height">48dp</dimen>
|
<dimen name="dashboard_category_title_height">48dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard category title margin start -->
|
<!-- Dashboard category title margin start -->
|
||||||
<dimen name="dashboard_category_title_margin_start">12dp</dimen>
|
<dimen name="dashboard_category_title_margin_start">16dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard tile minimum height -->
|
<!-- Dashboard tile minimum height -->
|
||||||
<dimen name="dashboard_tile_minimum_height">72dp</dimen>
|
<dimen name="dashboard_tile_minimum_height">72dp</dimen>
|
||||||
@@ -120,7 +130,7 @@
|
|||||||
<dimen name="dashboard_tile_image_size">24dp</dimen>
|
<dimen name="dashboard_tile_image_size">24dp</dimen>
|
||||||
|
|
||||||
<!-- Dashboard tile image margin start / end -->
|
<!-- Dashboard tile image margin start / end -->
|
||||||
<dimen name="dashboard_tile_image_margin_start">12dp</dimen>
|
<dimen name="dashboard_tile_image_margin_start">16dp</dimen>
|
||||||
<dimen name="dashboard_tile_image_margin_end">32dp</dimen>
|
<dimen name="dashboard_tile_image_margin_end">32dp</dimen>
|
||||||
|
|
||||||
<!-- SwitchBar margin start / end -->
|
<!-- SwitchBar margin start / end -->
|
||||||
|
@@ -81,6 +81,8 @@
|
|||||||
<item name="ic_wps">@drawable/ic_wps_dark</item>
|
<item name="ic_wps">@drawable/ic_wps_dark</item>
|
||||||
<item name="wifi_signal">@drawable/wifi_signal_dark</item>
|
<item name="wifi_signal">@drawable/wifi_signal_dark</item>
|
||||||
|
|
||||||
|
<item name="@*android:actionBarSize">@dimen/actionbar_size</item>
|
||||||
|
|
||||||
<item name="switchBarMarginStart">@dimen/switchbar_margin_start</item>
|
<item name="switchBarMarginStart">@dimen/switchbar_margin_start</item>
|
||||||
<item name="switchBarMarginEnd">@dimen/switchbar_margin_end</item>
|
<item name="switchBarMarginEnd">@dimen/switchbar_margin_end</item>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user