mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 12:49:55 +01:00
Improve PasswordActivity by
* removing screen border visible on small screens * showing noticeable error message on wrong password input * showing keyboard again after entering wrong password * making lost password link easier to recognize as link * renaming keyboard toggle method from 'hide' to 'toggle'
This commit is contained in:
@@ -1,65 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/margin_activity_vertical"
|
||||
android:paddingEnd="@dimen/margin_activity_horizontal"
|
||||
android:paddingRight="@dimen/margin_activity_horizontal"
|
||||
android:paddingStart="@dimen/margin_activity_horizontal"
|
||||
android:paddingLeft="@dimen/margin_activity_horizontal"
|
||||
android:paddingTop="@dimen/margin_activity_vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_password"
|
||||
style="@style/BriarTextTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:padding="@dimen/margin_large"
|
||||
android:text="@string/enter_password" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_password"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title_password"
|
||||
android:hint="@string/password_hint"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1" />
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/margin_activity_vertical"
|
||||
android:paddingEnd="@dimen/margin_activity_horizontal"
|
||||
android:paddingRight="@dimen/margin_activity_horizontal"
|
||||
android:paddingStart="@dimen/margin_activity_horizontal"
|
||||
android:paddingLeft="@dimen/margin_activity_horizontal"
|
||||
android:paddingTop="@dimen/margin_activity_vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sign_in"
|
||||
style="@style/BriarButton.Default"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/edit_password"
|
||||
android:layout_marginTop="@dimen/margin_xlarge"
|
||||
android:onClick="onSignInClick"
|
||||
android:text="@string/sign_in_button" />
|
||||
<TextView
|
||||
android:id="@+id/title_password"
|
||||
style="@style/BriarTextTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:padding="@dimen/margin_large"
|
||||
android:text="@string/enter_password" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_wheel"
|
||||
style="?android:attr/progressBarStyleInverse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/btn_sign_in"
|
||||
android:layout_alignBottom="@id/btn_sign_in"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:visibility="invisible" />
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:id="@+id/password_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_below="@id/title_password"
|
||||
app:errorEnabled="true">
|
||||
|
||||
<TextView
|
||||
style="@style/BriarTextBody"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/btn_sign_in"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/margin_large"
|
||||
android:clickable="true"
|
||||
android:onClick="onForgottenPasswordClick"
|
||||
android:text="@string/forgotten_password"
|
||||
android:textColor="?android:attr/textColorLink" />
|
||||
<EditText
|
||||
android:id="@+id/edit_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1" />
|
||||
|
||||
</RelativeLayout>
|
||||
</android.support.design.widget.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_sign_in"
|
||||
style="@style/BriarButton.Default"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/password_layout"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:onClick="onSignInClick"
|
||||
android:text="@string/sign_in_button" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_wheel"
|
||||
style="?android:attr/progressBarStyleInverse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/btn_sign_in"
|
||||
android:layout_alignBottom="@id/btn_sign_in"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/BriarTextBody"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/btn_sign_in"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/margin_large"
|
||||
android:clickable="true"
|
||||
android:onClick="onForgottenPasswordClick"
|
||||
android:text="@string/forgotten_password"
|
||||
android:textColor="?android:attr/textColorLink" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</ScrollView>
|
||||
@@ -17,7 +17,7 @@
|
||||
<color name="briar_primary">#2D3E50</color>
|
||||
<color name="briar_primary_dark">#0f1720</color>
|
||||
|
||||
<color name="briar_text_link">#2D3E50</color>
|
||||
<color name="briar_text_link">#75ab0d</color>
|
||||
<color name="briar_green_light">#95d220</color>
|
||||
<color name="briar_green_dark">#75ab0d</color>
|
||||
<color name="briar_text_primary">#333333</color>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="forgotten_password">I have forgotten my password</string>
|
||||
<string name="try_again">Wrong password, try again:</string>
|
||||
<string name="try_again">Wrong password, try again!</string>
|
||||
<string name="sign_in_button">Sign In</string>
|
||||
<string name="startup_failed_notification_title">Briar could not start</string>
|
||||
<string name="startup_failed_notification_text">You may need to reinstall Briar.</string>
|
||||
|
||||
Reference in New Issue
Block a user