Heavily improve dialogs
Both improve and use dialogs - The AlertDialog style now properly colors dialogs with the primary coler - The accent & blacklist dialogs are now based on AlertDialog for their buttons, reducing layout complexity
This commit is contained in:
@@ -36,28 +36,5 @@
|
||||
tools:itemCount="18"
|
||||
tools:listitem="@layout/item_accent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:padding="@dimen/padding_small">
|
||||
|
||||
<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" />
|
||||
|
||||
<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>
|
||||
@@ -44,37 +44,5 @@
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:padding="@dimen/padding_small">
|
||||
|
||||
<Button
|
||||
android:id="@+id/blacklist_cancel"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:layout_marginEnd="@dimen/padding_small"
|
||||
android:text="@android:string/cancel"
|
||||
app:layout_constraintEnd_toStartOf="@+id/blacklist_confirm"
|
||||
app:layout_constraintTop_toTopOf="@+id/blacklist_add" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/blacklist_confirm"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:text="@string/label_save"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/blacklist_cancel"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/blacklist_cancel" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/blacklist_add"
|
||||
style="@style/Widget.Button.Dialog"
|
||||
android:text="@string/label_add"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user