Fixes #4543 - Language selection: Search (#4744)

* initial changes

* add search feature for selecting language

* add search feature for selecting language

* upload issue fix

* minor improvement

* added test and updated settings language selection ui

Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
Pratham Pahariya 2021-12-31 16:03:36 +05:30 committed by GitHub
parent fcb7ccae3c
commit 06a347eee1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 524 additions and 207 deletions

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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">
<EditText
android:id="@+id/search_language"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:hint="Type Language Name"
android:padding="12dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"></EditText>
<ListView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:id="@+id/language_list"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/search_language" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -23,11 +23,14 @@
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_remove" />
<Spinner
android:id="@+id/spinner_description_languages"
<TextView
android:id="@+id/description_languages"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnerMode="dialog"
android:clickable="true"
android:drawableRight="@drawable/ic_baseline_arrow_drop_down_24"
android:padding="@dimen/dimen_2"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/caption_item_edit_text_input_layout"
app:layout_constraintStart_toStartOf="parent" />