diff options
Diffstat (limited to 'app/src/main/res/layout/gpodnetauth_credentials.xml')
-rw-r--r-- | app/src/main/res/layout/gpodnetauth_credentials.xml | 176 |
1 files changed, 93 insertions, 83 deletions
diff --git a/app/src/main/res/layout/gpodnetauth_credentials.xml b/app/src/main/res/layout/gpodnetauth_credentials.xml index 895b0999c..9fcf67cff 100644 --- a/app/src/main/res/layout/gpodnetauth_credentials.xml +++ b/app/src/main/res/layout/gpodnetauth_credentials.xml @@ -1,96 +1,106 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" - android:padding="16dp"> - - <ImageView - android:id="@id/icon" - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/gpodder_icon" /> + android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginBottom="8dp"> + + <ImageView + android:layout_width="64dp" + android:layout_height="64dp" + android:src="@drawable/gpodder_icon"/> + + <TextView + android:id="@+id/createAccountButton" + android:layout_width="0dp" + android:textAlignment="textEnd" + android:layout_height="wrap_content" + android:background="?attr/selectableItemBackground" + android:textColor="?colorAccent" + android:layout_weight="1" + android:layout_gravity="center_vertical|end" + android:text="@string/create_account"/> + </LinearLayout> <TextView - android:id="@id/txtvDescription" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/gpodnetauth_login_descr" - android:layout_below="@id/icon" - android:textSize="@dimen/text_size_medium" - android:textColor="?android:attr/textColorPrimary"/> + android:id="@+id/createAccountWarning" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/gpodnetauth_encryption_warning" + android:textColor="#F44336" + android:textStyle="bold" + android:visibility="invisible" /> - <EditText - android:id="@+id/etxtUsername" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/username_label" - android:layout_below="@id/txtvDescription" - android:focusable="true" - android:focusableInTouchMode="true" - android:cursorVisible="true" - android:maxLines="1" - android:inputType="text" - android:imeOptions="actionNext|flagNoFullscreen" - android:nextFocusForward="@id/etxtPassword"/> + <com.google.android.material.textfield.TextInputLayout + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <EditText - android:id="@+id/etxtPassword" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/password_label" - android:layout_below="@id/etxtUsername" - android:inputType="textPassword" - android:focusable="true" - android:focusableInTouchMode="true" - android:cursorVisible="true" - android:imeOptions="actionGo|flagNoFullscreen" - android:imeActionLabel="@string/gpodnetauth_login_butLabel"/> + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/etxtUsername" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/username_label" + android:lines="1" + android:imeOptions="actionNext|flagNoFullscreen"/> - <Button - android:id="@+id/butLogin" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_below="@id/etxtPassword" - android:layout_alignParentRight="true" - android:layout_alignParentEnd="true" - android:text="@string/gpodnetauth_login_butLabel"/> + </com.google.android.material.textfield.TextInputLayout> - <TextView - android:id="@+id/txtvError" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_below="@id/etxtPassword" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:layout_toLeftOf="@id/butLogin" - android:layout_toStartOf="@id/butLogin" - android:textColor="@color/download_failed_red" - android:textSize="@dimen/text_size_small" - android:maxLines="2" - android:ellipsize="end" - android:gravity="center" - android:layout_margin="16dp" - tools:text="Error message" - tools:background="@android:color/holo_green_dark" /> + <com.google.android.material.textfield.TextInputLayout + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <ProgressBar - android:id="@+id/progBarLogin" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:visibility="gone" - android:layout_alignTop="@+id/butLogin" - android:layout_toLeftOf="@+id/butLogin" - android:layout_toStartOf="@+id/butLogin"/> + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/etxtPassword" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/password_label" + android:inputType="textPassword" + android:lines="1" + android:imeOptions="actionNext|flagNoFullscreen" + android:imeActionLabel="@string/gpodnetauth_login_butLabel"/> - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="@dimen/text_size_medium" - android:textColor="?android:attr/textColorPrimary" - android:layout_marginTop="16dp" - android:text="@string/gpodnetauth_login_register" - android:autoLink="web" - android:layout_below="@id/butLogin"/> -</RelativeLayout>
\ No newline at end of file + </com.google.android.material.textfield.TextInputLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="end|center_vertical"> + + <TextView + android:id="@+id/credentialsError" + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:textColor="@color/download_failed_red" + android:textSize="@dimen/text_size_small" + android:maxLines="2" + android:ellipsize="end" + android:gravity="center" + tools:text="Error message" + tools:background="@android:color/holo_green_dark"/> + + <ProgressBar + android:id="@+id/progBarLogin" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone" + android:layout_gravity="right"/> + + <Button + android:id="@+id/butLogin" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/gpodnetauth_login_butLabel"/> + </LinearLayout> + +</LinearLayout> |