2020-04-09 22:36:59 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2020-11-02 21:58:01 +01:00
|
|
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
2020-04-09 22:36:59 +02:00
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2020-11-02 21:58:01 +01:00
|
|
|
android:id="@+id/profileRefreshLayout"
|
2020-12-26 12:10:54 +01:00
|
|
|
tools:context=".profile.ProfileActivity">
|
2020-04-09 22:36:59 +02:00
|
|
|
|
2020-11-02 21:58:01 +01:00
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent">
|
2020-05-01 11:26:18 +02:00
|
|
|
|
2020-11-02 21:58:01 +01:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content">
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
android:id="@+id/profilePictureImageView"
|
2021-02-26 11:21:04 +01:00
|
|
|
android:layout_width="88dp"
|
|
|
|
android:layout_height="88dp"
|
|
|
|
android:layout_marginStart="20dp"
|
|
|
|
android:layout_marginTop="6dp"
|
|
|
|
android:contentDescription="@string/profile_picture"
|
2020-11-02 21:58:01 +01:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
2021-02-26 11:21:04 +01:00
|
|
|
tools:srcCompat="@tools:sample/avatars" />
|
2020-11-02 21:58:01 +01:00
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/nbPostsTextView"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2021-02-26 11:21:04 +01:00
|
|
|
android:layout_marginStart="20dp"
|
|
|
|
android:layout_marginTop="6dp"
|
2020-11-02 21:58:01 +01:00
|
|
|
android:gravity="center"
|
|
|
|
android:text="@string/default_nposts"
|
2021-01-13 22:46:00 +01:00
|
|
|
android:textStyle="bold"
|
2021-02-26 11:21:04 +01:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/descriptionTextView" />
|
2020-11-02 21:58:01 +01:00
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/nbFollowersTextView"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:gravity="center"
|
|
|
|
android:text="@string/default_nfollowers"
|
2021-01-13 22:46:00 +01:00
|
|
|
android:textStyle="bold"
|
2020-11-02 21:58:01 +01:00
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/nbPostsTextView"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/nbFollowingTextView"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/nbPostsTextView"
|
|
|
|
app:layout_constraintTop_toTopOf="@+id/nbPostsTextView" />
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/nbFollowingTextView"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2021-02-26 11:21:04 +01:00
|
|
|
android:layout_marginEnd="20dp"
|
2020-11-02 21:58:01 +01:00
|
|
|
android:gravity="center"
|
|
|
|
android:text="@string/default_nfollowing"
|
2021-01-13 22:46:00 +01:00
|
|
|
android:textStyle="bold"
|
2020-11-02 21:58:01 +01:00
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/nbFollowersTextView"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="@+id/nbFollowersTextView" />
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/accountNameTextView"
|
2020-05-01 11:26:18 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2020-11-02 21:58:01 +01:00
|
|
|
android:layout_marginLeft="20dp"
|
|
|
|
android:layout_marginTop="5dp"
|
|
|
|
android:layout_marginRight="20dp"
|
|
|
|
android:text="@string/no_username"
|
2021-01-13 22:46:00 +01:00
|
|
|
android:textStyle="bold"
|
2020-11-02 21:58:01 +01:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2021-01-13 22:46:00 +01:00
|
|
|
app:layout_constraintTop_toBottomOf="@id/profilePictureImageView" />
|
2020-05-01 11:26:18 +02:00
|
|
|
|
|
|
|
|
2020-11-02 21:58:01 +01:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/descriptionTextView"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginLeft="20dp"
|
|
|
|
android:layout_marginTop="5dp"
|
|
|
|
android:layout_marginRight="20dp"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2021-02-26 11:21:04 +01:00
|
|
|
app:layout_constraintTop_toBottomOf="@id/accountNameTextView" />
|
2020-11-02 21:58:01 +01:00
|
|
|
|
|
|
|
<Button
|
|
|
|
android:id="@+id/followButton"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:backgroundTint="@color/colorButtonBg"
|
|
|
|
android:text="@string/follow"
|
|
|
|
android:textColor="@color/colorButtonText"
|
|
|
|
android:visibility="invisible"
|
2021-02-26 11:21:04 +01:00
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/profilePictureImageView"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
android:layout_marginEnd="20dp"
|
|
|
|
app:layout_constraintTop_toTopOf="@+id/profilePictureImageView"
|
|
|
|
tools:visibility="visible" />
|
2020-11-02 21:58:01 +01:00
|
|
|
|
|
|
|
<Button
|
|
|
|
android:id="@+id/editButton"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:backgroundTint="@color/colorButtonBg"
|
|
|
|
android:text="@string/edit_profile"
|
|
|
|
android:textColor="@color/colorButtonText"
|
|
|
|
android:visibility="gone"
|
|
|
|
app:icon="@drawable/ic_baseline_open_in_browser_24"
|
|
|
|
app:iconTint="@color/colorButtonText"
|
2021-02-26 11:21:04 +01:00
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/profilePictureImageView"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/profilePictureImageView"
|
|
|
|
app:layout_constraintTop_toTopOf="@+id/profilePictureImageView"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent" />
|
2020-11-02 21:58:01 +01:00
|
|
|
|
2021-02-08 15:07:23 +01:00
|
|
|
|
|
|
|
<ProgressBar
|
|
|
|
android:id="@+id/profileProgressBar"
|
|
|
|
style="?android:attr/progressBarStyle"
|
|
|
|
android:layout_width="wrap_content"
|
2020-11-02 21:58:01 +01:00
|
|
|
android:layout_height="wrap_content"
|
2021-02-08 15:07:23 +01:00
|
|
|
android:layout_marginTop="16dp"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
2020-11-02 21:58:01 +01:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2021-02-26 11:21:04 +01:00
|
|
|
app:layout_constraintTop_toBottomOf="@id/nbFollowersTextView" />
|
2020-11-02 21:58:01 +01:00
|
|
|
|
|
|
|
|
2021-02-08 15:07:23 +01:00
|
|
|
<androidx.constraintlayout.motion.widget.MotionLayout
|
|
|
|
android:id="@+id/motionLayout"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2021-02-26 11:21:04 +01:00
|
|
|
android:layout_marginTop="6dp"
|
2021-02-08 15:07:23 +01:00
|
|
|
android:visibility="visible"
|
|
|
|
app:layoutDescription="@xml/error_layout_xml_error_scene"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2021-02-26 11:21:04 +01:00
|
|
|
app:layout_constraintTop_toBottomOf="@id/nbFollowersTextView"
|
2021-02-08 15:07:23 +01:00
|
|
|
tools:visibility="visible">
|
|
|
|
|
|
|
|
<include
|
|
|
|
layout="@layout/error_layout"
|
|
|
|
tools:layout_editor_absoluteX="50dp" />
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
android:id="@+id/profilePostsRecyclerView"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_margin="5dp"
|
|
|
|
android:nestedScrollingEnabled="false"
|
|
|
|
app:layoutManager="LinearLayoutManager"
|
|
|
|
app:layout_constraintTop_toBottomOf="@id/errorLayout"
|
|
|
|
tools:listitem="@layout/fragment_profile_posts" />
|
|
|
|
|
|
|
|
</androidx.constraintlayout.motion.widget.MotionLayout>
|
|
|
|
|
|
|
|
|
2020-11-02 21:58:01 +01:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|