ConnectOut-sdp/sdp2023

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

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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/activity_comments"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingBottom="@dimen/activity_vertical_margin"
        tools:context=".chat.comment.CommentsActivity">


    <ListView
            android:id="@+id/list_of_comments"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_above="@+id/comment_input_container"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:layout_marginBottom="15dp"
            android:divider="@android:color/transparent"
            android:dividerHeight="16dp"
            android:scrollbarStyle="outsideInset" />

    <LinearLayout
            android:id="@+id/comment_input_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:orientation="vertical">

        <LinearLayout
                android:id="@+id/commentInput"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_marginBottom="0dp"
                android:background="@color/fui_buttonShadow"
                android:orientation="horizontal">

            <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/comment_input_layout"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="16dp"
                    android:layout_weight="1">

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

            <com.google.android.material.floatingactionbutton.FloatingActionButton
                    android:id="@+id/comment_post"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:clickable="true"
                    android:contentDescription="@string/send"
                    android:focusable="true"
                    android:tint="@android:color/white"
                    app:fabSize="mini"
                    app:srcCompat="@android:drawable/ic_menu_send" />
        </LinearLayout>
    </LinearLayout>

</RelativeLayout>