Xml文件  |  112行  |  5.16 KB

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<ScrollView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:fillViewport="true"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <LinearLayout
            android:id="@android:id/content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

        <FrameLayout
                android:adjustViewBounds="true"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="@dimen/diag_preferred_padding">
            <ImageView android:id="@android:id/icon"
                    android:adjustViewBounds="true"
                    android:maxHeight="24dp"
                    android:maxWidth="24dp"
                    android:layout_marginTop="@dimen/diag_icon_margin_top"
                    android:layout_marginBottom="8dp"
                    android:layout_gravity="center_horizontal"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:scaleType="centerInside"
                    android:visibility="gone"
                    android:src="@null" />
        </FrameLayout>

        <TextView android:id="@android:id/title"
                android:gravity="center"
                android:layout_marginBottom="8dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingLeft="@dimen/diag_preferred_padding"
                android:paddingRight="@dimen/diag_preferred_padding"
                android:textAppearance="@android:style/TextAppearance.Material.Title" />

        <TextView
                android:id="@android:id/message"
                android:gravity="center"
                android:layout_marginBottom="8dp"
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:paddingLeft="@dimen/diag_preferred_padding"
                android:paddingRight="@dimen/diag_preferred_padding"
                android:textAppearance="@android:style/TextAppearance.Material.Subhead"
                android:visibility="gone" />

        <FrameLayout
                android:id="@+id/buttonPanel"
                android:layout_weight="1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            <LinearLayout
                    android:id="@+id/buttonContainer"
                    android:orientation="horizontal"
                    android:gravity="center_horizontal|top"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:paddingTop="8dp"
                    android:paddingBottom="@dimen/diag_button_padding_bottom"
                    android:paddingLeft="@dimen/diag_button_padding_horizontal"
                    android:paddingRight="@dimen/diag_button_padding_horizontal"
                    style="?android:attr/buttonBarStyle">

                <ImageButton
                        android:id="@android:id/button2"
                        android:src="@drawable/ic_cc_clear"
                        android:background="@drawable/accept_deny_dialog_negative_bg"
                        android:contentDescription="@string/generic_cancel"
                        android:layout_width="@dimen/diag_button_size"
                        android:layout_height="@dimen/diag_button_size"
                        android:visibility="gone" />

                <Space
                        android:id="@+id/spacer"
                        android:layout_width="0dp"
                        android:layout_height="0dp"
                        android:visibility="gone"
                        android:layout_weight="1" />

                <ImageButton
                        android:id="@android:id/button1"
                        android:src="@drawable/ic_cc_checkmark"
                        android:background="@drawable/accept_deny_dialog_positive_bg"
                        android:contentDescription="@string/generic_yes"
                        android:layout_width="@dimen/diag_button_size"
                        android:layout_height="@dimen/diag_button_size"
                        android:visibility="gone" />
            </LinearLayout>
        </FrameLayout>
    </LinearLayout>
</ScrollView>