Update new UI layout of Conditional cards

Bug: 113451905
Test: visual
Change-Id: I20ec526bd2b5b2679cd7e0e4388a2a897fe6a24d
This commit is contained in:
Mill Chen
2018-11-08 18:55:01 +08:00
parent 0ca7130403
commit c89c4ceabb
4 changed files with 38 additions and 12 deletions

View File

@@ -24,9 +24,11 @@
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="@dimen/homepage_condition_full_card_height"
android:layout_height="wrap_content"
android:paddingStart="@dimen/homepage_card_padding_start"
android:paddingEnd="@dimen/homepage_card_padding_end"
android:paddingTop="@dimen/homepage_condition_full_card_padding_top"
android:paddingBottom="@dimen/homepage_condition_full_card_padding_bottom"
android:orientation="horizontal"
android:gravity="center_vertical">
@@ -59,13 +61,7 @@
</LinearLayout>
<View
android:id="@+id/divider"
android:layout_width="@dimen/homepage_condition_full_card_divider_width"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/homepage_condition_full_card_divider_padding_top"
android:layout_marginBottom="@dimen/homepage_condition_full_card_divider_padding_bottom"
android:background="?android:attr/dividerVertical" />
<include layout="@layout/vertical_divider"/>
<Button
android:id="@+id/first_action"

View File

@@ -40,6 +40,8 @@
android:id="@android:id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end"
android:layout_marginTop="@dimen/homepage_condition_half_card_title_margin_top"
android:layout_marginBottom="@dimen/homepage_condition_card_title_margin_bottom"
style="@style/TextAppearance.ConditionCardTitle"/>
@@ -48,6 +50,9 @@
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end"
android:layout_marginBottom="@dimen/homepage_condition_half_card_summary_margin_bottom"
style="@style/TextAppearance.ConditionCardSummary"/>
<include layout="@layout/horizontal_divider"/>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 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.
-->
<View
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/divider"
android:layout_width="@dimen/vertical_divider_width"
android:layout_height="match_parent"
android:background="?android:attr/dividerVertical"/>

View File

@@ -343,6 +343,9 @@
<dimen name="horizontal_divider_margin_bottom">8dp</dimen>
<dimen name="horizontal_divider_height">.75dp</dimen>
<!-- Vertical divider size -->
<dimen name="vertical_divider_width">.75dp</dimen>
<!-- Signal icon in NetworkSelectSetting -->
<dimen name="signal_strength_icon_size">24dp</dimen>
@@ -351,11 +354,10 @@
<dimen name="homepage_condition_half_card_height">150dp</dimen>
<dimen name="homepage_condition_half_card_padding_top">12dp</dimen>
<dimen name="homepage_condition_half_card_title_margin_top">12dp</dimen>
<dimen name="homepage_condition_full_card_height">72dp</dimen>
<dimen name="homepage_condition_half_card_summary_margin_bottom">12dp</dimen>
<dimen name="homepage_condition_full_card_padding_start">24dp</dimen>
<dimen name="homepage_condition_full_card_padding_end">24dp</dimen>
<dimen name="homepage_condition_full_card_divider_width">.75dp</dimen>
<dimen name="homepage_condition_full_card_divider_padding_top">12dp</dimen>
<dimen name="homepage_condition_full_card_divider_padding_bottom">12dp</dimen>
<dimen name="homepage_condition_full_card_padding_top">12dp</dimen>
<dimen name="homepage_condition_full_card_padding_bottom">12dp</dimen>
</resources>