SDPTeam15/PolyEvents

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

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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/id_fragment_profile"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".view.fragments.ProfileFragment">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbars="vertical"
        tools:ignore="UselessParent">

        <HorizontalScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="center">

                <LinearLayout
                    android:id="@+id/linearLayout"
                    android:layout_width="360dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:orientation="vertical"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="0.49"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintVertical_bias="0.35000002">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingStart="10dp"
                        android:paddingEnd="0dp">

                        <com.google.android.material.textfield.TextInputLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:background="@android:color/transparent"
                            android:hint="@string/FullNamePlaceholder"
                            app:boxBackgroundColor="@android:color/transparent">

                            <com.google.android.material.textfield.TextInputEditText
                                android:id="@+id/id_profile_name_edittext"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center_vertical"
                                android:drawableStart="@drawable/ic_contact"
                                android:drawablePadding="10dp"
                                android:enabled="false"
                                android:inputType="text"
                                android:paddingStart="20dp"
                                android:paddingEnd="0dp"
                                android:text=""
                                android:textStyle="bold" />
                        </com.google.android.material.textfield.TextInputLayout>
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingStart="10dp"
                        android:paddingEnd="0dp">

                        <com.google.android.material.textfield.TextInputLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:background="@android:color/transparent"
                            android:hint="@string/emailPlaceholder"
                            app:boxBackgroundColor="@android:color/transparent">

                            <com.google.android.material.textfield.TextInputEditText
                                android:id="@+id/id_profile_email_edittext"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center_vertical"
                                android:backgroundTintMode="add"
                                android:drawableStart="@drawable/ic_profile_email"
                                android:drawablePadding="10dp"
                                android:enabled="false"
                                android:inputType="textEmailAddress"
                                android:paddingStart="20dp"
                                android:paddingEnd="0dp"
                                android:text=""
                                android:textStyle="bold" />
                        </com.google.android.material.textfield.TextInputLayout>
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingStart="10dp"
                        android:paddingEnd="0dp">

                        <com.google.android.material.textfield.TextInputLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:background="@android:color/transparent"
                            android:hint="@string/UsernamePlaceholder"
                            app:boxBackgroundColor="@android:color/transparent">

                            <com.google.android.material.textfield.TextInputEditText
                                android:id="@+id/id_profile_username_edittext"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center_vertical"
                                android:drawableStart="@drawable/ic_assignment"
                                android:drawablePadding="10dp"
                                android:inputType="text"
                                android:paddingStart="20dp"
                                android:paddingEnd="0dp"
                                android:text=""
                                android:textStyle="bold" />
                        </com.google.android.material.textfield.TextInputLayout>
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingStart="10dp"
                        android:paddingEnd="0dp">

                        <androidx.constraintlayout.widget.ConstraintLayout
                            android:layout_width="match_parent"
                            android:layout_height="match_parent">

                            <com.google.android.material.textfield.TextInputLayout
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:background="@android:color/transparent"
                                android:enabled="false"
                                android:hint="@string/birthdayPlaceholder"
                                app:boxBackgroundColor="@android:color/transparent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent">

                                <com.google.android.material.textfield.TextInputEditText
                                    android:id="@+id/id_profile_birthday_edittext"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="center_vertical"
                                    android:drawableStart="@drawable/ic_profile_birthday"
                                    android:drawablePadding="10dp"
                                    android:enabled="false"
                                    android:inputType="date"
                                    android:paddingStart="20dp"
                                    android:paddingEnd="0dp"
                                    android:text=""
                                    android:textStyle="bold" />

                                <Button
                                    android:id="@+id/id_birthday_button"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:layout_weight="1"
                                    android:text="@string/select_birthday"
                                    app:layout_constraintEnd_toEndOf="parent"
                                    app:layout_constraintStart_toStartOf="@+id/id_profile_birthday_edittext"
                                    app:layout_constraintTop_toTopOf="parent" />

                            </com.google.android.material.textfield.TextInputLayout>
                        </androidx.constraintlayout.widget.ConstraintLayout>
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingStart="10dp"
                        android:paddingEnd="0dp">

                        <androidx.constraintlayout.widget.ConstraintLayout
                            android:layout_width="match_parent"
                            android:layout_height="200dp"
                            tools:context=".view.activity.admin.ItemsAdminActivity">

                            <ImageButton
                                android:id="@+id/id_add_profile_button"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginEnd="25dp"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintTop_toTopOf="parent"
                                app:srcCompat="@drawable/ic_add_36"
                                tools:ignore="ContentDescription" />

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginStart="10dp"
                                android:layout_marginTop="8dp"
                                android:text="@string/ProfileList"
                                android:textAppearance="@style/TextAppearance.AppCompat.Large"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <RelativeLayout
                                android:id="@+id/relativeLayout"
                                android:layout_width="match_parent"
                                android:layout_height="0dp"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/id_add_profile_button">

                                <androidx.recyclerview.widget.RecyclerView
                                    android:id="@+id/id_recycler_profile_list"
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:scrollbars="vertical"
                                    app:layoutManager="LinearLayoutManager" />

                            </RelativeLayout>

                        </androidx.constraintlayout.widget.ConstraintLayout>
                    </LinearLayout>

                    <Button
                        android:id="@+id/id_update_infos_button"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/update_infos" />

                    <Button
                        android:id="@+id/id_logout_button"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/logout_button_text" />

                </LinearLayout>

                <TextView
                    android:id="@+id/id_title_profile_fragment"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/profileFragmentTitle"
                    android:textAppearance="@style/TextAppearance.AppCompat.Large"
                    app:layout_constraintBottom_toTopOf="@+id/linearLayout"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="0.1"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>
        </HorizontalScrollView>
    </ScrollView>

</FrameLayout>