diff options
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/gpodnetauth_activity.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/layout/gpodnetauth_credentials.xml | 169 | ||||
-rw-r--r-- | app/src/main/res/layout/gpodnetauth_device.xml | 125 | ||||
-rw-r--r-- | app/src/main/res/layout/gpodnetauth_device_row.xml | 13 | ||||
-rw-r--r-- | app/src/main/res/layout/gpodnetauth_dialog.xml | 20 | ||||
-rw-r--r-- | app/src/main/res/layout/gpodnetauth_finish.xml | 32 | ||||
-rw-r--r-- | app/src/main/res/layout/gpodnetauth_host.xml | 50 |
7 files changed, 211 insertions, 208 deletions
diff --git a/app/src/main/res/layout/gpodnetauth_activity.xml b/app/src/main/res/layout/gpodnetauth_activity.xml deleted file mode 100644 index c096c20cf..000000000 --- a/app/src/main/res/layout/gpodnetauth_activity.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent"> -<ViewFlipper - android:id="@+id/viewflipper" - android:layout_width="match_parent" - android:layout_height="wrap_content"/> -</ScrollView>
\ No newline at end of file diff --git a/app/src/main/res/layout/gpodnetauth_credentials.xml b/app/src/main/res/layout/gpodnetauth_credentials.xml index 895b0999c..291b98da3 100644 --- a/app/src/main/res/layout/gpodnetauth_credentials.xml +++ b/app/src/main/res/layout/gpodnetauth_credentials.xml @@ -1,96 +1,97 @@ <?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"> - <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"/> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginBottom="8dp"> - <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"/> + <ImageView + android:layout_width="64dp" + android:layout_height="64dp" + android:src="@drawable/gpodder_icon"/> - <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"/> + <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> - <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 + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <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.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"/> - <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.TextInputLayout> - <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 + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <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"/> + + </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>
\ No newline at end of file diff --git a/app/src/main/res/layout/gpodnetauth_device.xml b/app/src/main/res/layout/gpodnetauth_device.xml index 7837121e1..656ba0889 100644 --- a/app/src/main/res/layout/gpodnetauth_device.xml +++ b/app/src/main/res/layout/gpodnetauth_device.xml @@ -1,114 +1,61 @@ <?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"> - - <TextView - android:id="@+id/txtvTitle" - android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/gpodnetauth_device_title" - android:layout_alignParentTop="true" - android:layout_marginBottom="16dp" - style="@style/AntennaPod.TextView.Heading"/> + android:orientation="vertical"> - <TextView - android:id="@+id/txtvDescription" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/gpodnetauth_device_descr" - android:layout_below="@id/txtvTitle" - android:textSize="@dimen/text_size_medium" - android:textColor="?android:attr/textColorPrimary"/> - - <EditText - android:id="@+id/etxtCaption" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/gpodnetauth_device_caption" - android:layout_below="@id/txtvDescription" - android:imeOptions="flagNoFullscreen"/> + <com.google.android.material.textfield.TextInputLayout + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <TextView - android:id="@+id/txtvDeviceID" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/gpodnetauth_device_deviceID" - android:textSize="@dimen/text_size_medium" - android:layout_below="@id/etxtCaption"/> + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/deviceName" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/gpodnetauth_device_name" + android:lines="1" + android:imeOptions="actionNext|flagNoFullscreen"/> - <EditText - android:id="@+id/etxtDeviceID" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/txtvDeviceID" - android:layout_alignParentRight="true" - android:layout_alignParentEnd="true" - android:imeOptions="flagNoFullscreen"/> + </com.google.android.material.textfield.TextInputLayout> <Button - android:id="@+id/butCreateNewDevice" - android:layout_width="wrap_content" + android:id="@+id/createDeviceButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right|end" + android:text="@string/gpodnetauth_create_device"/> + + <TextView + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_alignParentEnd="true" - android:layout_below="@id/etxtDeviceID" - android:text="@string/gpodnetauth_device_butCreateNewDevice"/> + style="@style/AntennaPod.TextView.Heading" + android:layout_marginTop="16dp" + android:text="@string/gpodnetauth_existing_devices"/> <TextView - android:id="@+id/txtvError" - android:layout_width="0dp" + android:id="@+id/deviceSelectError" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:layout_below="@id/etxtDeviceID" - android:layout_toLeftOf="@id/butCreateNewDevice" - android:layout_toStartOf="@id/butCreateNewDevice" android:textColor="@color/download_failed_red" android:textSize="@dimen/text_size_small" + android:visibility="gone" tools:text="Error message" tools:background="@android:color/holo_green_dark" /> - <ProgressBar - android:id="@+id/progbarCreateDevice" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignTop="@id/butCreateNewDevice" - android:layout_toLeftOf="@id/butCreateNewDevice" - android:layout_toStartOf="@id/butCreateNewDevice" - android:textColor="@color/download_failed_red" - android:textSize="@dimen/text_size_medium" - android:visibility="gone" - /> - - <TextView - android:id="@+id/txtvChooseExistingDevice" + <LinearLayout + android:id="@+id/devicesContainer" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/gpodnetauth_device_chooseExistingDevice" - android:layout_below="@id/butCreateNewDevice" - android:textColor="?android:attr/textColorPrimary" - android:textSize="@dimen/text_size_medium" - android:layout_marginTop="32dp"/> + android:orientation="vertical" /> - <Button - android:id="@+id/butChooseExistingDevice" + <ProgressBar + android:id="@+id/progbarCreateDevice" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/gpodnetauth_device_butChoose" - android:layout_below="@+id/spinnerChooseDevice" - android:layout_alignParentRight="true" - android:layout_alignParentEnd="true"/> - - <Spinner - android:id="@+id/spinnerChooseDevice" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/txtvChooseExistingDevice" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true"/> + android:textColor="@color/download_failed_red" + android:visibility="gone" /> -</RelativeLayout>
\ No newline at end of file +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/gpodnetauth_device_row.xml b/app/src/main/res/layout/gpodnetauth_device_row.xml new file mode 100644 index 000000000..d39c00571 --- /dev/null +++ b/app/src/main/res/layout/gpodnetauth_device_row.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="8dp"> + + <Button + android:id="@+id/selectDeviceButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="?attr/materialButtonOutlinedStyle" /> +</FrameLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/gpodnetauth_dialog.xml b/app/src/main/res/layout/gpodnetauth_dialog.xml new file mode 100644 index 000000000..a70b76a49 --- /dev/null +++ b/app/src/main/res/layout/gpodnetauth_dialog.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + android:clipToPadding="false"> + <ViewFlipper + android:id="@+id/viewflipper" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inAnimation="@anim/slide_right_in" + android:outAnimation="@anim/slide_left_out"> + + <include layout="@layout/gpodnetauth_host" /> + <include layout="@layout/gpodnetauth_credentials" /> + <include layout="@layout/gpodnetauth_device" /> + <include layout="@layout/gpodnetauth_finish" /> + + </ViewFlipper> +</ScrollView>
\ No newline at end of file diff --git a/app/src/main/res/layout/gpodnetauth_finish.xml b/app/src/main/res/layout/gpodnetauth_finish.xml index fdaa0d5d0..f0bcfd4dc 100644 --- a/app/src/main/res/layout/gpodnetauth_finish.xml +++ b/app/src/main/res/layout/gpodnetauth_finish.xml @@ -1,46 +1,28 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent" - android:padding="16dp"> + android:layout_height="wrap_content" + android:orientation="vertical"> <ImageView android:id="@id/icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_width="64dp" + android:layout_height="64dp" android:src="@drawable/gpodder_icon" /> <TextView - android:id="@+id/txtvTitle" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/icon" - android:text="@string/gpodnetauth_finish_title" - style="@style/AntennaPod.TextView.Heading"/> - - <TextView android:id="@+id/txtvDescription" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/gpodnetauth_finish_descr" - android:layout_below="@id/txtvTitle" - android:textSize="@dimen/text_size_medium" android:textColor="?android:attr/textColorPrimary" /> <Button android:id="@+id/butSyncNow" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@id/txtvDescription" - android:layout_marginTop="16dp" + android:layout_marginTop="8dp" android:text="@string/gpodnetauth_finish_butsyncnow"/> - <Button - android:id="@+id/butGoMainscreen" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/butSyncNow" - android:text="@string/gpodnetauth_finish_butgomainscreen"/> - -</RelativeLayout>
\ No newline at end of file +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/gpodnetauth_host.xml b/app/src/main/res/layout/gpodnetauth_host.xml new file mode 100644 index 000000000..52c5fdb5d --- /dev/null +++ b/app/src/main/res/layout/gpodnetauth_host.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <RadioGroup + android:id="@+id/serverRadioGroup" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <RadioButton + android:id="@+id/officialServerRadio" + android:text="@string/gpodnetauth_server_official" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:checked="true"/> + <RadioButton + android:id="@+id/customServerRadio" + android:text="@string/gpodnetauth_server_custom" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + </RadioGroup> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/serverUrlTextInput" + style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" + android:visibility="gone" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/serverUrlText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/gpodnetauth_host" + android:inputType="textNoSuggestions" + android:lines="1" + android:imeOptions="actionNext|flagNoFullscreen" /> + + </com.google.android.material.textfield.TextInputLayout> + + <Button + android:id="@+id/chooseHostButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right|end" + android:text="@string/gpodnetauth_select_server"/> + +</LinearLayout>
\ No newline at end of file |