Auto-complete feature for the login page

This commit adds an auto-complete feature to select the users instance. It fetches all the instances from lemmyverse.net so everyone can find their instance :)

Closes #38
This commit is contained in:
Balazs Toldi
2023-11-09 20:17:24 +01:00
parent 9f02969dd2
commit 55f4689984
10 changed files with 165 additions and 7 deletions

View File

@@ -50,13 +50,15 @@
android:layout_height="wrap_content"
android:hint="@string/instance_url">
<com.google.android.material.textfield.TextInputEditText
<androidx.appcompat.widget.AppCompatAutoCompleteTextView
android:id="@+id/instance_url_input"
style="@style/Widget.MaterialComponents.AutoCompleteTextView.FilledBox"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="@string/instance_url"
android:inputType="textUri"
android:maxLines="1" />
android:maxLines="1"
android:paddingTop="16dp" />
</com.google.android.material.textfield.TextInputLayout>
@@ -66,7 +68,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:text="The URL of you prefered Lemmy instance with or without the https:// prefix" />
android:text="@string/the_url_of_you_prefered_lemmy_instance_with_or_without_the_https_prefix" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"

View File

@@ -1454,4 +1454,5 @@
<string name="settings_credits_new_icon_summary">Made by David Gerla</string>
<string name="original_app">The original Reddit app</string>
<string name="settings_credits_original_app_description">"Infinity was created by u/Hostilenemy "</string>
<string name="the_url_of_you_prefered_lemmy_instance_with_or_without_the_https_prefix">The URL of you prefered Lemmy instance with or without the https:// prefix</string>
</resources>