This is the initial change for updating the suggestion cards: - add a feature flag to swap between the new and current UI - change suggestions to a standalone dashboard item. It becomes a horizontal scroll list that won't collapse/expand. - the expand/collapse logic now only control the conditions list - add draft for the new suggestion UI elements, but detail to fine-tune to match the UI spec will come in following changes. Bug: 70573674 Test: make RunSettingsRoboTests Change-Id: I00c901e2598b26a34288fc73fd6031cc26a29ac6
85 lines
3.2 KiB
XML
85 lines
3.2 KiB
XML
<?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.
|
|
-->
|
|
|
|
<android.support.v7.widget.CardView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/suggestion_card"
|
|
android:layout_width="328dp"
|
|
android:layout_height="wrap_content"
|
|
app:cardUseCompatPadding="true"
|
|
app:cardElevation="2dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="112dp"
|
|
android:orientation="vertical"
|
|
android:background="@android:color/white">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal">
|
|
|
|
<ImageView
|
|
android:id="@android:id/icon"
|
|
android:layout_width="@dimen/dashboard_tile_image_size"
|
|
android:layout_height="@dimen/dashboard_tile_image_size"
|
|
android:layout_centerHorizontal = "true"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<ImageView
|
|
android:id="@+id/close_button"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentEnd="true"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:src="@drawable/ic_suggestion_close_button"/>
|
|
|
|
</RelativeLayout>
|
|
|
|
<TextView
|
|
android:id="@android:id/title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:singleLine="true"
|
|
android:textAppearance="@style/TextAppearance.TileTitle"
|
|
android:ellipsize="marquee"
|
|
android:fadingEdge="horizontal" />
|
|
|
|
<TextView
|
|
android:id="@android:id/summary"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:textAppearance="@style/TextAppearance.SuggestionSummary" />
|
|
|
|
<Button
|
|
android:id="@android:id/primary"
|
|
style="@style/ActionPrimaryButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="12dp"
|
|
android:text="@string/suggestion_button_text" />
|
|
|
|
</LinearLayout>
|
|
|
|
</android.support.v7.widget.CardView>
|