app/src/main/res/layout/user_profile_fragment.xml
<?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">
<data>
<variable
name="viewModel"
type="com.example.sharingang.viewmodels.UserProfileViewModel" />
</data>
<LinearLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical"
tools:context=".ui.fragments.UserProfileFragment">
<Space
android:layout_width="wrap_content"
android:layout_height="5dp" />
<TextView
android:id="@+id/upf_topinfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/userNotLoggedInInfo"
android:textSize="14sp" />
<Space
android:layout_width="wrap_content"
android:layout_height="5dp" />
<Button
android:id="@+id/btn_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/log_in"
app:icon="@drawable/googleg_standard_color_18"/>
<TextView
android:id="@+id/nameText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="0dp"
android:layout_marginBottom="0dp"
android:textAppearance="@style/TextAppearance.AppCompat.Display1"
android:textSize="30sp"
tools:text="John Doe" />
<TextView
android:id="@+id/text_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-black" />
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />
<Button
android:id="@+id/btn_logout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/log_out"
android:backgroundTint="@color/faded_red"/>
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageView"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/imageview_border"
android:contentDescription="@string/txt_user_profile_picture"
android:cropToPadding="true"
android:padding="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<ImageButton
android:id="@+id/btn_open_gallery"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginEnd="5dp"
android:layout_marginBottom="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@android:drawable/ic_menu_gallery"
android:contentDescription="@string/open_gallery" />
<ImageButton
android:id="@+id/btn_open_camera"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="5dp"
android:layout_marginBottom="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@android:drawable/ic_menu_camera"
android:contentDescription="@string/open_camera"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />
<Button
android:id="@+id/btnChat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/chat" />
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<Button
android:id="@+id/btn_report"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/report_user"
android:visibility="gone"
tools:ignore="ButtonStyle" />
<Button
android:id="@+id/btn_block"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/faded_red"
android:text="@string/block_user"
android:visibility="gone"
tools:ignore="ButtonStyle" />
</LinearLayout>
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />
<TextView
android:id="@+id/rating_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/default_rating" />
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingHorizontal="30dp">
<RadioGroup
android:id="@+id/offersRequestsGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:ignore="UselessParent">
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/offersButton"
android:layout_width="0dp"
android:layout_height="50dp"
android:textColor="@color/white"
android:text="@string/offers"
android:layout_weight="1"
android:gravity="center"
android:button="@android:color/transparent"
android:background="@drawable/radio_button_left_selector"
android:checked="true"/>
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/requestsButton"
android:layout_width="0dp"
android:layout_height="50dp"
android:textColor="@color/white"
android:text="@string/requests"
android:layout_weight="1"
android:gravity="center"
android:button="@android:color/transparent"
android:background="@drawable/radio_button_right_selector"
android:checked="false"/>
</RadioGroup>
</LinearLayout>
<Space
android:layout_width="match_parent"
android:layout_height="10dp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/userItemList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</layout>