Factotum-sdp/Factotum

View on GitHub
app/src/main/res/layout/fragment_contacts.xml

Summary

Maintainability
Test Coverage
<LinearLayout
    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"
    android:id="@+id/fragment_directory_directors_parent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".ui.directory.DirectoryFragment">


    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/contacts_search_view_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="6dp"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
        app:startIconDrawable="@drawable/ic_search">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/contacts_search_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/searchbar_hint" />
    </com.google.android.material.textfield.TextInputLayout>


    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/contacts_recycler_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="4dp" />

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/add_contact_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_marginEnd="@dimen/fab_margin"
            android:layout_marginBottom="16dp"
            android:contentDescription="@string/add_contacts_floating_button"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:srcCompat="@android:drawable/ic_input_add" />

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/empty_contacts_message"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            android:text="@string/no_contacts_found"
            android:textAlignment="center"
            android:textStyle="italic"
            android:textSize="20sp"
            android:visibility="gone" />
    </FrameLayout>

</LinearLayout>