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

Commit 6b19fa90 authored by Maurice Lam's avatar Maurice Lam
Browse files

[FRP] Theming for Pattern and Password screens

Basic theming for pattern and password screens. Create subclasses for
ChooseLockPassword and ChooseLockPattern, and copied their XML
layouts.

This CL mainly uses the buttons in the original screens as-is, with a
follow-up CL coming to change to use the nav bar buttons.

Bug: 18482708
Change-Id: I81751f781de633aff23fc68657589360007c235a
parent c868f703
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1159,8 +1159,17 @@
            android:excludeFromRecents="true"
        />

        <activity android:name="SetupChooseLockPattern"
            android:exported="false"
            android:theme="@style/SetupWizardDisableAppStartingTheme" />

        <activity android:name="ChooseLockPattern" android:exported="false"/>

        <activity android:name="SetupChooseLockPassword"
            android:exported="false"
            android:theme="@style/SetupWizardDisableAppStartingTheme"
            android:windowSoftInputMode="stateVisible|adjustResize" />

        <activity android:name="ChooseLockPassword" android:exported="false"
            android:windowSoftInputMode="stateVisible|adjustResize"/>

+68 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2014 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="match_parent"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_weight="1"
        android:layout_width="match_parent"
        android:layout_height="0dp">

        <FrameLayout
            android:id="@+id/title_area"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:background="@drawable/setup_illustration_bg"
            android:elevation="@dimen/setup_wizard_title_area_elevation">

            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/wifi_setup_title"
                style="@style/SetupTitle"/>
        </FrameLayout>

        <ScrollView
            android:id="@+id/bottom_scroll_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/title_area"
            android:layout_alignParentBottom="true"
            android:fillViewport="true">

            <FrameLayout android:id="@+id/setup_content"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:clipChildren="false"/>

        </ScrollView>

    </RelativeLayout>

    <fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
        android:id="@+id/navigation_bar"
        android:layout_width="match_parent"
        android:layout_height="56dip"
        style="@style/setup_wizard_navbar_style"/>
</LinearLayout>
+74 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2014 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="match_parent"
    android:orientation="vertical">

    <com.android.settings.widget.SetupWizardIllustration
        android:id="@+id/illustration_tablet"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:background="@drawable/setup_illustration_bg"
        android:foreground="@drawable/setup_illustration_wifi_wide">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="start|top"
            android:weightSum="16">

            <TextView
                android:id="@+id/title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/setup_wizard_tablet_illustration_height"
                android:layout_weight="6"
                android:text="@string/wifi_setup_title"
                style="@style/SetupCardTitle"/>

            <ScrollView
                android:id="@+id/bottom_scroll_view"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginTop="@dimen/setup_wizard_card_land_margin_top"
                android:layout_weight="8"
                android:background="@drawable/setup_wizard_card_bg"
                android:elevation="@dimen/setup_wizard_card_elevation"
                android:fillViewport="true">

                <FrameLayout android:id="@+id/setup_content"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:clipChildren="false"/>

            </ScrollView>

        </LinearLayout>

    </com.android.settings.widget.SetupWizardIllustration>

    <fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
        android:id="@+id/navigation_bar"
        android:layout_width="match_parent"
        android:layout_height="56dip"
        style="@style/setup_wizard_navbar_style"/>

</LinearLayout>
+74 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2014 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="match_parent"
    android:orientation="vertical">

    <com.android.settings.widget.SetupWizardIllustration
        android:id="@+id/illustration_tablet"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:background="@drawable/setup_illustration_bg"
        android:foreground="@drawable/setup_illustration_wifi_wide">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="@dimen/setup_wizard_tablet_illustration_height"
            android:orientation="vertical"
            android:paddingStart="@dimen/setup_wizard_card_port_margin_sides"
            android:paddingEnd="@dimen/setup_wizard_card_port_margin_sides">

            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/wifi_setup_title"
                style="@style/SetupCardTitle"/>

            <ScrollView
                android:id="@+id/bottom_scroll_view"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:background="@drawable/setup_wizard_card_bg"
                android:elevation="@dimen/setup_wizard_card_elevation"
                android:fillViewport="true">

                <FrameLayout
                    android:id="@+id/setup_content"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:clipChildren="false"/>

            </ScrollView>

        </LinearLayout>

    </com.android.settings.widget.SetupWizardIllustration>

    <fragment android:name="com.android.setupwizard.navigationbar.SetupWizardNavBar"
        android:id="@+id/navigation_bar"
        android:layout_width="match_parent"
        android:layout_height="56dip"
        style="@style/setup_wizard_navbar_style"/>

</LinearLayout>
+83 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2014 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="match_parent"
    android:gravity="center_horizontal"
    android:orientation="vertical">

    <!-- header text ('Enter Pin') -->
    <TextView android:id="@+id/headerText"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:lines="2"
        android:textAppearance="?android:attr/textAppearanceMedium"/>

    <!-- Password entry field -->
    <EditText android:id="@+id/password_entry"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginStart="30dip"
        android:layout_marginEnd="30dip"
        android:gravity="center"
        android:inputType="textPassword"
        android:imeOptions="actionNext"
        android:textSize="24sp"
        style="@style/TextAppearance.PasswordEntry"/>

    <!-- Spacer between password entry and keyboard -->
    <View
        android:layout_width="match_parent"
        android:layout_height="0dip"
        android:layout_weight="1"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        style="@style/SecurityPreferenceButtonContainer">

        <!-- left : cancel -->
        <Button android:id="@+id/cancel_button"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/lockpassword_cancel_label"
            style="@style/SecurityPreferenceButton"/>

        <!-- right : continue -->
        <Button android:id="@+id/next_button"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/lockpassword_continue_label"
            style="@style/SecurityPreferenceButton"/>

    </LinearLayout>

    <!-- Alphanumeric keyboard -->
    <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#00000000"
        android:keyBackground="@*android:drawable/btn_keyboard_key_fulltrans"
        android:visibility="gone"/>

</LinearLayout>
Loading