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

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 <?xml version="1.0" encoding="utf-8"?>
     2 <!--
     3    This Source Code Form is subject to the terms of the Mozilla Public
     4    - License, v. 2.0. If a copy of the MPL was not distributed with this
     5    - file, You can obtain one at http://mozilla.org/MPL/2.0/.
     6 -->
     8 <merge xmlns:android="http://schemas.android.com/apk/res/android" >
    10     <LinearLayout
    11         android:layout_width="fill_parent"
    12         android:layout_height="wrap_content"
    13         android:orientation="vertical" >
    15         <AutoCompleteTextView
    16             android:id="@+id/email"
    17             style="@style/FxAccountEditItem"
    18             android:layout_marginBottom="10dp"
    19             android:completionThreshold="2"
    20             android:ems="10"
    21             android:hint="@string/fxaccount_email_hint"
    22             android:inputType="textEmailAddress" >
    24             <requestFocus />
    25         </AutoCompleteTextView>
    27         <LinearLayout
    28             android:layout_width="fill_parent"
    29             android:layout_height="wrap_content"
    30             android:orientation="horizontal" >
    32             <EditText
    33                 android:id="@+id/password"
    34                 style="@style/FxAccountEditItem"
    35                 android:layout_width="fill_parent"
    36                 android:layout_height="wrap_content"
    37                 android:layout_weight="1"
    38                 android:background="@drawable/fxaccount_password_background"
    39                 android:ems="10"
    40                 android:hint="@string/fxaccount_password_hint"
    41                 android:inputType="textPassword" />
    43             <!-- For the following, I beg forgiveness. The show/hide button is a
    44                  toggle button; its text depends on its state. The text for each
    45                  state could be a different length. We want to maintain the
    46                  button's width regardless of its state. To achieve this, we
    47                  size the actual button to its container, and include two
    48                  invisible (but present for layout purposes) buttons, one of
    49                  each state. The container wraps the larger of the two dummy
    50                  buttons; the actual button sizes to the container; and we're
    51                  happy. Be thankful there are not three buttons! -->
    52             <FrameLayout
    53                 android:layout_width="wrap_content"
    54                 android:layout_height="fill_parent"
    55                 android:layout_weight="0"
    56                 android:orientation="horizontal" >
    58                 <Button
    59                     android:id="@+id/show_password"
    60                     style="@style/FxAccountShowHidePasswordButton"
    61                     android:layout_width="fill_parent"
    62                     android:layout_height="fill_parent"
    63                     android:text="@string/fxaccount_password_show" >
    64                 </Button>
    66                 <Button
    67                     style="@style/FxAccountShowHidePasswordButton"
    68                     android:layout_width="wrap_content"
    69                     android:layout_height="fill_parent"
    70                     android:text="@string/fxaccount_password_show"
    71                     android:visibility="invisible" >
    72                 </Button>
    74                 <Button
    75                     style="@style/FxAccountShowHidePasswordButton"
    76                     android:layout_width="wrap_content"
    77                     android:layout_height="fill_parent"
    78                     android:text="@string/fxaccount_password_hide"
    79                     android:visibility="invisible" >
    80                 </Button>
    81             </FrameLayout>
    82         </LinearLayout>
    83     </LinearLayout>
    85 </merge>

mercurial