PixelDroid-App-Android/app/src/main/res/layout/activity_profile.xml

147 lines
6.3 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ProfileActivity">
2020-04-26 11:36:30 +02:00
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/profilePictureImageView"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_weight="1"
tools:srcCompat="@tools:sample/avatars" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="10"
android:orientation="horizontal">
<TextView
android:id="@+id/nbPostsTextView"
android:layout_width="15dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="@string/default_nposts" />
2020-04-26 11:36:30 +02:00
<TextView
android:id="@+id/nbFollowersTextView"
android:layout_width="15dp"
android:layout_height="120dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/default_nfollowers" />
2020-04-26 11:36:30 +02:00
<TextView
android:id="@+id/nbFollowingTextView"
android:layout_width="15dp"
android:layout_height="120dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/default_nfollowing" />
2020-04-26 11:36:30 +02:00
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:layout_marginRight="20dp">
<TextView
android:id="@+id/accountNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/no_username"
2020-04-26 11:36:30 +02:00
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp">
<TextView
android:id="@+id/descriptionTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginBottom="15dp">
<Button
android:id="@+id/followButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/follow"
2020-04-26 11:36:30 +02:00
android:visibility="invisible"
android:textColor="@color/colorButtonText"
android:backgroundTint="@color/colorButtonBg"
2020-04-26 11:36:30 +02:00
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/editButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/colorButtonText"
android:backgroundTint="@color/colorButtonBg"
2020-04-26 11:36:30 +02:00
android:visibility="gone"
android:text="@string/edit_profile"
2020-04-26 11:36:30 +02:00
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
2020-04-30 21:49:42 +02:00
<com.google.android.material.tabs.TabLayout
android:id="@+id/profile_tabs"
2020-04-26 11:36:30 +02:00
android:layout_width="match_parent"
2020-04-30 21:49:42 +02:00
android:layout_height="wrap_content"
app:tabMode="fixed"
2020-05-21 21:11:15 +02:00
app:tabBackground="@color/colorPrimaryTab" />
2020-04-26 11:36:30 +02:00
2020-04-30 21:49:42 +02:00
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/profile_view_pager"
2020-04-26 11:36:30 +02:00
android:layout_width="match_parent"
2020-04-30 21:49:42 +02:00
android:layout_height="match_parent" />
2020-04-26 11:36:30 +02:00
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>