Improve dialog layouts
Improve the dialog layouts so that only the recyclerview scrolls when it cannot fit instead of the entire layout being forced to scroll.
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/background"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
android:orientation="vertical"
|
||||
android:theme="@style/Theme.Neutral">
|
||||
|
||||
<TextView
|
||||
@@ -26,32 +26,38 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/accent_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:foregroundGravity="center"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="org.oxycblt.auxio.settings.accent.AutoGridLayoutManager"
|
||||
app:layout_constraintBottom_toTopOf="@+id/accent_cancel"
|
||||
app:layout_constraintTop_toBottomOf="@+id/accent_header"
|
||||
tools:spanCount="6"
|
||||
tools:itemCount="18"
|
||||
tools:listitem="@layout/item_accent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/accent_cancel"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:layout_marginEnd="@dimen/margin_small"
|
||||
android:text="@android:string/cancel"
|
||||
app:layout_constraintEnd_toStartOf="@+id/accent_confirm"
|
||||
app:layout_constraintTop_toBottomOf="@+id/accent_recycler" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:padding="@dimen/padding_small">
|
||||
|
||||
<Button
|
||||
android:id="@+id/accent_confirm"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:layout_marginEnd="@dimen/margin_small"
|
||||
android:text="@android:string/ok"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/accent_cancel"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/accent_cancel" />
|
||||
<Button
|
||||
android:id="@+id/accent_cancel"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:layout_marginEnd="@dimen/margin_small"
|
||||
android:text="@android:string/cancel"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/accent_confirm" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<Button
|
||||
android:id="@+id/accent_confirm"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:text="@android:string/ok"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/accent_cancel"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/accent_cancel" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -3,52 +3,52 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/background"
|
||||
android:orientation="vertical"
|
||||
android:theme="@style/Theme.Neutral">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/blacklist_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_exbold"
|
||||
android:padding="@dimen/padding_medium"
|
||||
android:text="@string/setting_content_blacklist"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="@dimen/text_size_toolbar_header" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/blacklist_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/item_blacklist_entry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/blacklist_empty_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:padding="@dimen/padding_medium"
|
||||
android:text="@string/label_no_dirs"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
android:theme="@style/Theme.Neutral">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/blacklist_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_exbold"
|
||||
android:padding="@dimen/padding_medium"
|
||||
android:text="@string/setting_content_blacklist"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="@dimen/text_size_toolbar_header"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/blacklist_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@+id/blacklist_header"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/item_blacklist_entry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/blacklist_empty_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:padding="@dimen/padding_medium"
|
||||
android:text="@string/label_no_dirs"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintTop_toBottomOf="@+id/blacklist_recycler" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:padding="@dimen/padding_small">
|
||||
|
||||
<Button
|
||||
android:id="@+id/blacklist_cancel"
|
||||
@@ -61,7 +61,6 @@
|
||||
<Button
|
||||
android:id="@+id/blacklist_confirm"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:layout_marginEnd="@dimen/margin_small"
|
||||
android:text="@string/label_save"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/blacklist_cancel"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -70,13 +69,12 @@
|
||||
<Button
|
||||
android:id="@+id/blacklist_add"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:layout_marginStart="@dimen/margin_small"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:text="@string/label_add"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/blacklist_empty_text" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -104,7 +104,6 @@
|
||||
<string name="error_load_failed">Laden die Musik fehlgeschlagen</string>
|
||||
<string name="error_no_perms">Auxio braucht Berechtigung, zu lesen deine Musikbibliothek</string>
|
||||
<string name="error_no_browser">Link könnte nicht geöffnet werden</string>
|
||||
<string name="error_brick_dir">Das Stammverzeichnis kann nicht ausgeschlossen sein</string>
|
||||
|
||||
<!-- Hint Namespace | EditText Hints -->
|
||||
<string name="hint_search_library">Durchsuche deine Musikbibliothek…</string>
|
||||
|
||||
@@ -105,8 +105,7 @@
|
||||
<string name="error_load_failed">Music loading failed</string>
|
||||
<string name="error_no_perms">Auxio needs permission to read your music library</string>
|
||||
<string name="error_no_browser">Could not open link</string>
|
||||
<string name="error_brick_dir">The root folder cannot be excluded</string>
|
||||
<string name="error_bad_dir">That directory is not supported</string>
|
||||
<string name="error_bad_dir">This directory is not supported</string>
|
||||
|
||||
<!-- Hint Namespace | EditText Hints -->
|
||||
<string name="hint_search_library">Search your library…</string>
|
||||
|
||||
Reference in New Issue
Block a user