diff options
author | Simon Rusinov <mrpinkolik@gmail.com> | 2022-10-15 14:29:39 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 11:29:39 +0200 |
commit | 4c30d8ff7ff855e3cc25caf383620857a4319c79 (patch) | |
tree | df25c3213e007ce39f724e95e8fba38cfe5479c7 /app/src/main/res | |
parent | 8ff9dd829aa24ef7f0581dadcf3726a64f289955 (diff) | |
download | AntennaPod-4c30d8ff7ff855e3cc25caf383620857a4319c79.zip |
Add auto-complete to discovery country selection (#6139)
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/fragment_itunes_search.xml | 34 | ||||
-rw-r--r-- | app/src/main/res/layout/select_country_dialog.xml | 22 | ||||
-rw-r--r-- | app/src/main/res/menu/countries_menu.xml | 17 |
3 files changed, 47 insertions, 26 deletions
diff --git a/app/src/main/res/layout/fragment_itunes_search.xml b/app/src/main/res/layout/fragment_itunes_search.xml index 369928d1d..d39d49c04 100644 --- a/app/src/main/res/layout/fragment_itunes_search.xml +++ b/app/src/main/res/layout/fragment_itunes_search.xml @@ -7,40 +7,22 @@ android:layout_height="match_parent" android:fitsSystemWindows="true"> - <LinearLayout - android:id="@+id/browsing" + <com.google.android.material.appbar.MaterialToolbar + android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:minHeight="?attr/actionBarSize" android:orientation="horizontal" - android:layout_alignParentTop="true"> - - <com.google.android.material.appbar.MaterialToolbar - android:id="@+id/toolbar" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:minHeight="?attr/actionBarSize" - android:theme="?attr/actionBarTheme" - app:navigationIcon="?homeAsUpIndicator" - app:title="@string/discover" /> - - <android.widget.Spinner - android:id="@+id/spinner_country" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="right|end" - android:gravity="right|end" - android:isScrollContainer="true" - android:minHeight="?attr/actionBarSize" - android:spinnerMode="dropdown" - android:textAlignment="textEnd" /> - - </LinearLayout> + android:theme="?attr/actionBarTheme" + app:navigationIcon="?homeAsUpIndicator" + app:title="@string/discover" /> <GridView android:id="@+id/gridView" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_below="@id/browsing" + android:layout_below="@id/toolbar" android:clipToPadding="false" android:columnWidth="400dp" android:gravity="center" diff --git a/app/src/main/res/layout/select_country_dialog.xml b/app/src/main/res/layout/select_country_dialog.xml new file mode 100644 index 000000000..4b77492d3 --- /dev/null +++ b/app/src/main/res/layout/select_country_dialog.xml @@ -0,0 +1,22 @@ +<?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="match_parent" + android:orientation="vertical"> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/country_text_input" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="20dp" + android:hint="@string/country" + style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox.ExposedDropdownMenu"> + + <AutoCompleteTextView + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + </com.google.android.material.textfield.TextInputLayout> + +</LinearLayout> diff --git a/app/src/main/res/menu/countries_menu.xml b/app/src/main/res/menu/countries_menu.xml new file mode 100644 index 000000000..7e31b7467 --- /dev/null +++ b/app/src/main/res/menu/countries_menu.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <item + android:id="@+id/discover_hide_item" + android:checkable="true" + android:enabled="true" + android:title="@string/discover_hide" + android:visible="true" + app:showAsAction="never" /> + <item + android:id="@+id/discover_countries_item" + android:enabled="true" + android:title="@string/country" + android:visible="true" /> +</menu>
\ No newline at end of file |