Files
app_Settings/res/layout/wifi_dpp_fragment_header.xml
Arc Wang 4ab826ac5b Set Wi-Fi DPP fragment icons.
1. set fragment icon for WifiDppChooseSavedWifiNetworkFragment
2. set fragment icon of success for WifiDppAddDeviceFragment

All Wi-Fi DPP fragment icons are VectorDrawable of instinct size
24dp draw on a 48dp canvas. Except for ic_devices_check_circle_green,
it's a LayerDrawable of different size. I dynamically change ImageView
layout width & height between these 2 different kind of drawable.

Bug: 122982132
Test: manual test
Change-Id: Idab8cd8b0798363e447da00dc6bc68a86498b8be
2019-01-29 17:02:14 +08:00

67 lines
2.4 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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/EntityHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<ImageView
android:id="@android:id/icon"
android:layout_width="@dimen/wifi_dpp_fragment_icon_width_height"
android:layout_height="@dimen/wifi_dpp_fragment_icon_width_height"
android:scaleType="fitCenter"/>
<!-- Special header icon only for ic_devices_check_circle_green -->
<ImageView
android:id="@+id/devices_check_circle_green_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_devices_check_circle_green"
android:scaleType="fitCenter"/>
<TextView
android:id="@android:id/title"
style="@style/TextAppearance.EntityHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAlignment="center"
android:layout_marginTop="8dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"/>
<TextView
android:id="@android:id/summary"
style="@style/TextAppearance.EntityHeaderSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="false"
android:gravity="center_horizontal"
android:textAlignment="center"
android:layout_marginTop="2dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"/>
</LinearLayout>