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

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

Merge "Add wear specific layout for GrantCredentialsPermissionActivity"

parents 04b3438c 87d53285
Loading
Loading
Loading
Loading
+152 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
 * Copyright (c) 2008, Google Inc.
 *
 * 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:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:divider="?android:attr/dividerHorizontal"
    android:showDividers="middle"
    android:dividerPadding="0dip"
    android:theme="@style/Theme.DeviceDefault"
    android:background="?attr/colorBackground">

    <!-- The list of packages that correspond to the requesting UID
    and the account/authtokenType that is being requested -->
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fillViewport="true"
        android:layout_weight="1"
        android:gravity="top|center_horizontal">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="36dip"
            android:orientation="vertical">

            <TextView
                android:id="@+id/grant_credentials_permission_message_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/grant_credentials_permission_message_header"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:paddingStart="28dip"
                android:paddingEnd="20dp"
                android:paddingBottom="12dip" />

            <LinearLayout
                android:id="@+id/packages_list"
                android:orientation="vertical"
                android:paddingStart="16dip"
                android:paddingEnd="12dip"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <RelativeLayout
                android:paddingStart="16dip"
                android:paddingEnd="12dip"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <ImageView
                    android:id="@+id/permission_icon"
                    android:layout_width="30dip"
                    android:layout_height="30dip"
                    android:src="@drawable/ic_bullet_key_permission"
                    android:layout_alignParentStart="true"
                    android:scaleType="fitCenter" />

                <TextView
                    android:id="@+id/account_type"
                    android:textAppearance="?android:attr/textAppearanceMedium"
                    android:textColor="@color/perms_dangerous_perm_color"
                    android:textStyle="bold"
                    android:paddingStart="16dip"
                    android:layout_toEndOf="@id/permission_icon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />

                <TextView
                    android:id="@+id/account_name"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColor="@color/perms_dangerous_perm_color"
                    android:layout_marginTop="-4dip"
                    android:paddingBottom="8dip"
                    android:paddingStart="16dip"
                    android:layout_below="@id/account_type"
                    android:layout_toEndOf="@id/permission_icon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />

                <TextView
                    android:id="@+id/authtoken_type"
                    android:textAppearance="?android:attr/textAppearanceMedium"
                    android:textColor="@color/perms_dangerous_perm_color"
                    android:textStyle="bold"
                    android:layout_marginTop="-4dip"
                    android:paddingBottom="8dip"
                    android:paddingStart="16dip"
                    android:layout_below="@id/account_name"
                    android:layout_toEndOf="@id/permission_icon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />
            </RelativeLayout>

            <TextView
                android:id="@+id/grant_credentials_permission_message_footer"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/grant_credentials_permission_message_footer"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:paddingStart="19dip"
                android:paddingBottom="12dip" />
        </LinearLayout>
    </ScrollView>

    <!-- The buttons to allow or deny -->
    <LinearLayout
        android:id="@+id/buttons"
        android:layout_marginStart="25dp"
        android:layout_marginEnd="25dp"
        android:layout_marginBottom="10dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="?android:attr/buttonBarStyle">

        <Button
            android:id="@+id/deny_button"
            android:text="@string/deny"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="2"
            style="?android:attr/buttonBarButtonStyle" />

        <Button
            android:id="@+id/allow_button"
            android:text="@string/allow"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="2"
            style="?android:attr/buttonBarButtonStyle" />

    </LinearLayout>
</LinearLayout>
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->

<!--
  Defines the layout of a single package item.
  Contains a bullet point icon and the name of the package.
-->

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/Theme.DeviceDefault">

    <ImageView
        android:id="@+id/package_icon"
        android:layout_width="30dip"
        android:layout_height="30dip"
        android:layout_alignParentStart="true"
        android:src="@drawable/ic_text_dot"
        android:scaleType="fitCenter" />


    <TextView
        android:id="@+id/package_label"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textStyle="bold"
        android:paddingStart="6dip"
        android:layout_toEndOf="@id/package_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</RelativeLayout>