Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3ca58ff authored by Chip Fukuhara's avatar Chip Fukuhara Committed by Android (Google) Code Review
Browse files

Merge "Apply Dovetail 1.1 spec to AppError & ANR dialogs"

parents bce3f1d3 15c38e7e
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:showDividers="middle"
    android:divider="@drawable/global_action_item_divider">
    <Button
        android:id="@+id/aerr_close"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/aerr_close_app"
        android:drawableStart="@drawable/ic_close"
        style="@style/aerr_list_item"/>
    <Button
        android:id="@+id/aerr_wait"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/aerr_wait"
        android:drawableStart="@drawable/ic_schedule"
        style="@style/aerr_list_item"/>
    <Button
        android:id="@+id/aerr_report"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/aerr_report"
        android:drawableStart="@drawable/ic_feedback"
        style="@style/aerr_list_item"/>
</LinearLayout>
+58 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:showDividers="middle"
    android:divider="@drawable/global_action_item_divider">
    <Button
        android:id="@+id/aerr_restart"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/aerr_restart"
        android:drawableStart="@drawable/ic_refresh"
        style="@style/aerr_list_item" />
    <Button
        android:id="@+id/aerr_app_info"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/app_info"
        android:drawableStart="@drawable/ic_info_outline_24"
        style="@style/aerr_list_item" />
    <Button
        android:id="@+id/aerr_close"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/aerr_close_app"
        android:drawableStart="@drawable/ic_close"
        style="@style/aerr_list_item" />
    <Button
        android:id="@+id/aerr_report"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/aerr_report"
        android:drawableStart="@drawable/ic_feedback"
        style="@style/aerr_list_item" />
    <Button
        android:id="@+id/aerr_mute"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/aerr_mute"
        android:drawableStart="@drawable/ic_eject_24dp"
        style="@style/aerr_list_item" />
</LinearLayout>
+114 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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.android.internal.widget.WatchListDecorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/parentPanel"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ScrollView
        android:id="@+id/scrollView"
        android:fillViewport="true"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="?dialogPreferredPadding"
            android:paddingRight="?dialogPreferredPadding"
            android:paddingTop="@dimen/base_error_dialog_top_padding"
            android:paddingBottom="@dimen/base_error_dialog_bottom_padding"
            android:orientation="vertical" >
            <!-- Top Panel -->
            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/topPanel">
                <include android:id="@+id/title_template"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    layout="@layout/watch_base_error_dialog_title"/>
            </FrameLayout>
            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="16dp">
            </FrameLayout>
            <!-- Content Panel -->
            <FrameLayout
                android:id="@+id/contentPanel"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:clipToPadding="false">
                <TextView
                    android:id="@+id/message"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal|top"
                    android:textAppearance="@style/TextAppearance.DeviceDefault.Body1"
                    android:paddingTop="8dip"
                    android:paddingBottom="8dip"/>
            </FrameLayout>
            <!-- Custom Panel, to replace content panel if needed -->
            <FrameLayout
                android:id="@+id/customPanel"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:minHeight="64dp">
                <FrameLayout
                    android:id="@+android:id/custom"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>
            </FrameLayout>

            <!-- Button Panel -->
            <FrameLayout
                android:id="@+id/buttonPanel"
                android:layout_weight="1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:orientation="vertical"
                    style="?android:attr/buttonBarStyle"
                    android:measureWithLargestChild="true">
                    <Button
                        android:id="@+id/button1"
                        android:layout_gravity="start"
                        android:layout_weight="1"
                        style="?android:attr/buttonBarButtonStyle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"/>
                    <Button
                        android:id="@+id/button3"
                        android:layout_gravity="start"
                        android:layout_weight="1"
                        style="?android:attr/buttonBarButtonStyle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"/>
                    <Button
                        android:id="@+id/button2"
                        android:layout_gravity="start"
                        android:layout_weight="1"
                        style="?android:attr/buttonBarButtonStyle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"/>
                </LinearLayout>
            </FrameLayout>
        </LinearLayout>
    </ScrollView>
</com.android.internal.widget.WatchListDecorLayout>
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="@dimen/base_error_dialog_contents_padding"
    android:paddingRight="@dimen/base_error_dialog_contents_padding"
    android:orientation="vertical"
    android:gravity="top|center_horizontal">
    <FrameLayout
        android:adjustViewBounds="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <ImageView
            android:id="@+id/icon"
            android:adjustViewBounds="true"
            android:maxHeight="24dp"
            android:maxWidth="24dp"
            android:layout_marginTop="@dimen/screen_percentage_10"
            android:layout_gravity="center_horizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@null"/>
    </FrameLayout>
    <TextView
        android:id="@+id/alertTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="38dp"
        android:textAppearance="@style/TextAppearance.Watch.BaseErrorDialog.Title"
        android:maxLines="3"
        android:gravity="center_horizontal|top"/>
</LinearLayout>
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 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.
  -->
<resources>
    <!-- 14.4% of display size -->
    <dimen name="base_error_dialog_top_padding">26dp</dimen>
    <!-- 2.8% of display size -->
    <dimen name="base_error_dialog_padding">5dp</dimen>
    <!-- 35.56% of display size -->
    <dimen name="base_error_dialog_bottom_padding">64dp</dimen>
</resources>
Loading