Flag: com.android.settings.flags.updated_suggestion_card_aosp Bug: 323258154 Test: Enable flag and trigger suggestion cards to show Change-Id: Iee47d05d8d75c10ba073ae3541f108bc37b4c09b
		
			
				
	
	
		
			97 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			97 lines
		
	
	
		
			3.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="utf-8"?>
 | |
| <!--
 | |
|     Copyright (C) 2024 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.
 | |
| -->
 | |
| <com.google.android.material.card.MaterialCardView
 | |
|     xmlns:android="http://schemas.android.com/apk/res/android"
 | |
|     xmlns:tools="http://schemas.android.com/tools"
 | |
|     xmlns:apps="http://schemas.android.com/apk/res-auto"
 | |
|     android:id="@+id/suggestion_card"
 | |
|     android:layout_width="match_parent"
 | |
|     android:layout_height="wrap_content"
 | |
|     android:layout_marginBottom="16dp"
 | |
|     style="@style/SuggestionCardStyle">
 | |
| 
 | |
|     <LinearLayout
 | |
|         android:id="@+id/card_container"
 | |
|         android:layout_width="match_parent"
 | |
|         android:layout_height="wrap_content"
 | |
|         android:baselineAligned="false"
 | |
|         android:minHeight="72dp"
 | |
|         android:paddingStart="16dp"
 | |
|         android:paddingEnd="16dp"
 | |
|         android:orientation="horizontal"
 | |
|         android:gravity="center_vertical"
 | |
|         android:background="?android:attr/selectableItemBackground">
 | |
| 
 | |
|         <FrameLayout
 | |
|             android:id="@android:id/icon_frame"
 | |
|             android:layout_width="wrap_content"
 | |
|             android:layout_height="wrap_content"
 | |
|             tools:ignore="ContentDescription">
 | |
| 
 | |
|             <ImageView
 | |
|                 android:layout_width="wrap_content"
 | |
|                 android:layout_height="wrap_content"
 | |
|                 android:src="@drawable/suggestion_icon_background"/>
 | |
| 
 | |
|             <ImageView
 | |
|                 android:id="@android:id/icon"
 | |
|                 android:layout_width="24dp"
 | |
|                 android:layout_height="24dp"
 | |
|                 android:layout_gravity="center"/>
 | |
| 
 | |
|         </FrameLayout>
 | |
| 
 | |
|         <LinearLayout
 | |
|             android:id="@+id/text_container"
 | |
|             android:layout_width="0dp"
 | |
|             android:layout_height="wrap_content"
 | |
|             android:layout_weight="1"
 | |
|             android:paddingStart="16dp"
 | |
|             android:paddingEnd="16dp"
 | |
|             android:paddingVertical="@dimen/suggestion_card_text_padding_vertical"
 | |
|             android:orientation="vertical">
 | |
| 
 | |
|             <TextView
 | |
|                 android:id="@android:id/title"
 | |
|                 android:layout_width="match_parent"
 | |
|                 android:layout_height="wrap_content"
 | |
|                 android:textAppearance="@style/TextAppearance.SuggestionCardTitle"/>
 | |
| 
 | |
|             <TextView
 | |
|                 android:id="@android:id/summary"
 | |
|                 android:layout_width="match_parent"
 | |
|                 android:layout_height="wrap_content"
 | |
|                 android:textAppearance="@style/TextAppearance.SuggestionCardSummary"/>
 | |
| 
 | |
|         </LinearLayout>
 | |
| 
 | |
|         <ImageView
 | |
|             android:id="@android:id/closeButton"
 | |
|             android:layout_width="48dp"
 | |
|             android:layout_height="48dp"
 | |
|             android:padding="8dp"
 | |
|             android:visibility="gone"
 | |
|             android:layout_gravity="center"
 | |
|             android:contentDescription="@string/suggestion_button_close"
 | |
|             android:src="@drawable/ic_suggestion_close_button"
 | |
|             android:tint="@color/settingslib_materialColorPrimaryContainer"
 | |
|             android:background="?android:attr/selectableItemBackground" />
 | |
| 
 | |
|     </LinearLayout>
 | |
| 
 | |
| </com.google.android.material.card.MaterialCardView>
 |