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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial