mobile/android/base/resources/layout/fxaccount_email_password_view.xml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mobile/android/base/resources/layout/fxaccount_email_password_view.xml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,85 @@
     1.4 +<?xml version="1.0" encoding="utf-8"?>
     1.5 +<!--
     1.6 +   This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +-->
    1.10 +
    1.11 +<merge xmlns:android="http://schemas.android.com/apk/res/android" >
    1.12 +
    1.13 +    <LinearLayout
    1.14 +        android:layout_width="fill_parent"
    1.15 +        android:layout_height="wrap_content"
    1.16 +        android:orientation="vertical" >
    1.17 +
    1.18 +        <AutoCompleteTextView
    1.19 +            android:id="@+id/email"
    1.20 +            style="@style/FxAccountEditItem"
    1.21 +            android:layout_marginBottom="10dp"
    1.22 +            android:completionThreshold="2"
    1.23 +            android:ems="10"
    1.24 +            android:hint="@string/fxaccount_email_hint"
    1.25 +            android:inputType="textEmailAddress" >
    1.26 +
    1.27 +            <requestFocus />
    1.28 +        </AutoCompleteTextView>
    1.29 +
    1.30 +        <LinearLayout
    1.31 +            android:layout_width="fill_parent"
    1.32 +            android:layout_height="wrap_content"
    1.33 +            android:orientation="horizontal" >
    1.34 +
    1.35 +            <EditText
    1.36 +                android:id="@+id/password"
    1.37 +                style="@style/FxAccountEditItem"
    1.38 +                android:layout_width="fill_parent"
    1.39 +                android:layout_height="wrap_content"
    1.40 +                android:layout_weight="1"
    1.41 +                android:background="@drawable/fxaccount_password_background"
    1.42 +                android:ems="10"
    1.43 +                android:hint="@string/fxaccount_password_hint"
    1.44 +                android:inputType="textPassword" />
    1.45 +
    1.46 +            <!-- For the following, I beg forgiveness. The show/hide button is a
    1.47 +                 toggle button; its text depends on its state. The text for each
    1.48 +                 state could be a different length. We want to maintain the
    1.49 +                 button's width regardless of its state. To achieve this, we
    1.50 +                 size the actual button to its container, and include two
    1.51 +                 invisible (but present for layout purposes) buttons, one of
    1.52 +                 each state. The container wraps the larger of the two dummy
    1.53 +                 buttons; the actual button sizes to the container; and we're
    1.54 +                 happy. Be thankful there are not three buttons! -->
    1.55 +            <FrameLayout
    1.56 +                android:layout_width="wrap_content"
    1.57 +                android:layout_height="fill_parent"
    1.58 +                android:layout_weight="0"
    1.59 +                android:orientation="horizontal" >
    1.60 +
    1.61 +                <Button
    1.62 +                    android:id="@+id/show_password"
    1.63 +                    style="@style/FxAccountShowHidePasswordButton"
    1.64 +                    android:layout_width="fill_parent"
    1.65 +                    android:layout_height="fill_parent"
    1.66 +                    android:text="@string/fxaccount_password_show" >
    1.67 +                </Button>
    1.68 +
    1.69 +                <Button
    1.70 +                    style="@style/FxAccountShowHidePasswordButton"
    1.71 +                    android:layout_width="wrap_content"
    1.72 +                    android:layout_height="fill_parent"
    1.73 +                    android:text="@string/fxaccount_password_show"
    1.74 +                    android:visibility="invisible" >
    1.75 +                </Button>
    1.76 +
    1.77 +                <Button
    1.78 +                    style="@style/FxAccountShowHidePasswordButton"
    1.79 +                    android:layout_width="wrap_content"
    1.80 +                    android:layout_height="fill_parent"
    1.81 +                    android:text="@string/fxaccount_password_hide"
    1.82 +                    android:visibility="invisible" >
    1.83 +                </Button>
    1.84 +            </FrameLayout>
    1.85 +        </LinearLayout>
    1.86 +    </LinearLayout>
    1.87 +
    1.88 +</merge>

mercurial