Add blacklist UI

Add a UI for the blacklist functionality.
This commit is contained in:
OxygenCobalt
2021-03-13 17:07:42 -07:00
parent 9d83619811
commit aa0c978a65
19 changed files with 335 additions and 32 deletions
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
android:theme="@style/Theme.Neutral"
android:paddingBottom="@dimen/margin_medium"
android:orientation="vertical">
<TextView
android:id="@+id/blacklist_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/inter_exbold"
android:textColor="?attr/colorPrimary"
android:text="@string/setting_content_blacklist"
android:textSize="@dimen/text_size_toolbar_header"
android:padding="@dimen/padding_medium"
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"
tools:itemCount="2"
tools:listitem="@layout/item_blacklist_entry"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@+id/blacklist_header" />
<TextView
android:id="@+id/blacklist_add"
style="@style/ItemText.Primary"
android:padding="@dimen/margin_medium"
android:layout_width="match_parent"
android:layout_marginStart="0dp"
android:text="@string/label_add"
android:gravity="center_vertical|start"
android:background="@drawable/ui_ripple"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:drawableStartCompat="@drawable/ic_add"
android:drawablePadding="@dimen/padding_medium"
app:layout_constraintTop_toBottomOf="@+id/blacklist_recycler" />
<Button
android:id="@+id/blacklist_cancel"
style="@style/Widget.Button.Dialog"
android:layout_marginEnd="@dimen/padding_small"
android:layout_marginTop="@dimen/margin_medium"
android:text="@android:string/cancel"
app:layout_constraintEnd_toStartOf="@+id/blacklist_confirm"
app:layout_constraintTop_toBottomOf="@+id/blacklist_add" />
<Button
android:id="@+id/blacklist_confirm"
style="@style/Widget.Button.Dialog"
android:layout_marginEnd="@dimen/margin_medium"
android:text="@string/label_confirm"
app:layout_constraintBottom_toBottomOf="@+id/blacklist_cancel"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/blacklist_cancel" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings"
android:clickable="false"
android:focusable="false">
<TextView
android:id="@+id/blacklist_title"
style="@style/ItemText.Primary"
android:layout_marginStart="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="/storage/emulated/0/directory" />
<ImageButton
android:id="@+id/blacklist_clear"
style="@style/Widget.Button.Unbounded"
android:layout_width="@dimen/size_clear"
android:layout_height="@dimen/size_clear"
android:src="@drawable/ic_clear"
android:contentDescription="@string/description_blacklist_delete"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>