Files
app_Settings/res/layout/nearby_sharing_suggestion_card.xml
Haijie Hong a9e67c0327 Add Nearby share entrypoint in DevicePicker
Bug: 381799866
Test: local build
Flag: com.android.settings.flags.enable_nearby_share_entrypoint
Change-Id: Ied79b9eebe7eaf669e45922787c5b01e504822d8
2025-02-21 17:24:10 +08:00

93 lines
4.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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:id="@+id/nearby_sharing_suggestion_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingVertical="@dimen/settingslib_expressive_space_medium3">
<LinearLayout
android:id="@+id/card_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:paddingHorizontal="@dimen/settingslib_expressive_space_small1"
android:orientation="horizontal"
android:gravity="center_vertical"
android:background="@drawable/settingslib_card_preference_background">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center_horizontal"
android:paddingTop="@dimen/settingslib_expressive_space_small1">
<ImageView
android:layout_width="@dimen/settingslib_expressive_space_medium4"
android:layout_height="@dimen/settingslib_expressive_space_medium4"
android:layout_gravity="center"
android:padding="@dimen/settingslib_expressive_space_extrasmall2"
android:scaleType="fitCenter"
android:src="@drawable/circle"
android:tint="@color/settingslib_materialColorPrimary"
android:importantForAccessibility="no"/>
<ImageView
android:layout_width="@dimen/settingslib_expressive_space_small3"
android:layout_height="@dimen/settingslib_expressive_space_small3"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:src="@drawable/ic_bluetooth_share_info"
android:tint="@color/settingslib_materialColorPrimaryContainer"
android:importantForAccessibility="no"/>
</FrameLayout>
<LinearLayout
android:id="@+id/text_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingHorizontal="@dimen/settingslib_expressive_space_small1"
android:paddingTop="@dimen/settingslib_expressive_space_small1"
android:paddingBottom="@dimen/settingslib_expressive_space_small4"
android:orientation="vertical">
<TextView
android:id="@+id/nearby_sharing_suggestion_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.CardTitle.SettingsLib" />
<TextView
android:id="@+id/nearby_sharing_suggestion_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/settingslib_expressive_space_extrasmall2"
android:textAppearance="@style/TextAppearance.CardSummary.SettingsLib"
android:text="@string/bluetooth_try_nearby_share_summary"/>
</LinearLayout>
<ImageView
android:layout_width="@dimen/settingslib_expressive_space_small4"
android:layout_height="@dimen/settingslib_expressive_space_small4"
android:layout_gravity="center"
android:src="@drawable/ic_chevron_right_24dp"
android:tint="@color/settingslib_materialColorPrimary"
android:importantForAccessibility="no"
android:contentDescription="@null"/>
</LinearLayout>
</LinearLayout>