Xml文件  |  75行  |  2.81 KB

<?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"/>

    <!-- Add title_summary_container to group content for Talkback -->
    <LinearLayout
        android:id="@+id/title_summary_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:focusable="true">

        <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>
</LinearLayout>