summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2020-10-03 12:32:05 +0200
committerByteHamster <info@bytehamster.com>2021-01-02 11:53:58 +0100
commit7b8208a2a7a7fd81a9dd1ff547d422d08255c4e1 (patch)
treeb6ca65b4be2d4adaebcb4c53bc3c43417c22dd3e /app/src/main/res
parentd1426f97740103d548db007e3ad2c918d90f8bf0 (diff)
downloadAntennaPod-7b8208a2a7a7fd81a9dd1ff547d422d08255c4e1.zip
Simplified gpodder login process
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/gpodnetauth_activity.xml10
-rw-r--r--app/src/main/res/layout/gpodnetauth_credentials.xml169
-rw-r--r--app/src/main/res/layout/gpodnetauth_device.xml120
-rw-r--r--app/src/main/res/layout/gpodnetauth_device_group.xml35
-rw-r--r--app/src/main/res/layout/gpodnetauth_dialog.xml20
-rw-r--r--app/src/main/res/layout/gpodnetauth_finish.xml32
-rw-r--r--app/src/main/res/layout/gpodnetauth_host.xml50
-rw-r--r--app/src/main/res/xml/preferences_gpodder.xml14
8 files changed, 237 insertions, 213 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..10ba5486f 100644
--- a/app/src/main/res/layout/gpodnetauth_device.xml
+++ b/app/src/main/res/layout/gpodnetauth_device.xml
@@ -1,114 +1,62 @@
<?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"/>
+ <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/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.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"/>
- <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.TextInputLayout>
- <EditText
- android:id="@+id/etxtDeviceID"
+ <TextView
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"/>
-
- <Button
- android:id="@+id/butCreateNewDevice"
- android:layout_width="wrap_content"
- 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_sync_groups"/>
<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/deviceGroups"
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"
+ android:id="@+id/startNewGroupButton"
+ android:text="@string/gpodnetauth_sync_group_new"
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"/>
+ style="?attr/materialButtonOutlinedStyle"
+ android:layout_gravity="right"/>
- <Spinner
- android:id="@+id/spinnerChooseDevice"
- android:layout_width="match_parent"
+ <ProgressBar
+ android:id="@+id/progbarCreateDevice"
+ android:layout_width="wrap_content"
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_group.xml b/app/src/main/res/layout/gpodnetauth_device_group.xml
new file mode 100644
index 000000000..8660779b3
--- /dev/null
+++ b/app/src/main/res/layout/gpodnetauth_device_group.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout
+ 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="wrap_content"
+ android:paddingTop="8dp">
+
+ <com.google.android.material.card.MaterialCardView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:strokeWidth="2dp"
+ app:strokeColor="?attr/currently_playing_background">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="8dp">
+ <TextView
+ android:id="@+id/groupContents"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
+
+ <Button
+ android:id="@+id/selectGroupButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ style="?attr/borderlessButtonStyle"
+ android:text="@string/gpodnetauth_sync_group_select"/>
+ </LinearLayout>
+
+ </com.google.android.material.card.MaterialCardView>
+</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
diff --git a/app/src/main/res/xml/preferences_gpodder.xml b/app/src/main/res/xml/preferences_gpodder.xml
index 7bddbf245..a210b8e11 100644
--- a/app/src/main/res/xml/preferences_gpodder.xml
+++ b/app/src/main/res/xml/preferences_gpodder.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
-
- <PreferenceScreen
+ <Preference
+ android:key="pref_gpodnet_description"
+ android:icon="@drawable/gpodder_icon"
+ android:summary="@string/gpodnet_description"/>
+ <Preference
android:key="pref_gpodnet_authenticate"
android:title="@string/pref_gpodnet_authenticate_title"
- android:summary="@string/pref_gpodnet_authenticate_sum">
- <intent android:action=".activity.gpoddernet.GpodnetAuthenticationActivity"/>
- </PreferenceScreen>
+ android:summary="@string/pref_gpodnet_authenticate_sum"/>
<Preference
android:key="pref_gpodnet_setlogin_information"
android:title="@string/pref_gpodnet_setlogin_information_title"
@@ -23,8 +24,5 @@
<Preference
android:key="pref_gpodnet_logout"
android:title="@string/pref_gpodnet_logout_title"/>
- <Preference
- android:key="pref_gpodnet_hostname"
- android:title="@string/pref_gpodnet_sethostname_title"/>
</PreferenceScreen>