Created Advanced User information fragment.

This commit is contained in:
Pierre HUBERT
2018-07-30 16:37:19 +02:00
parent 9b559dce3d
commit 0c7c2cbead
7 changed files with 277 additions and 273 deletions

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="16dp"
android:paddingEnd="16dp"
android:paddingStart="16dp"
android:paddingTop="16dp">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="83dp"
android:layout_marginBottom="32dp"
android:layout_marginTop="8dp"
app:layout_constraintBottom_toTopOf="@+id/scrollView2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<org.communiquons.android.comunic.client.ui.views.WebUserAccountImage
android:id="@+id/user_account_image"
android:layout_width="@dimen/account_image_default_width"
android:layout_height="@dimen/account_image_default_height"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:src="@drawable/default_account_image"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:textAppearance="@style/TextAppearance.AppCompat.Display1"
app:layout_constraintBottom_toBottomOf="@+id/user_account_image"
app:layout_constraintStart_toEndOf="@+id/user_account_image"
app:layout_constraintTop_toTopOf="@+id/user_account_image"
tools:text="User name" />
</android.support.constraint.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:layout_editor_absoluteX="134dp"
tools:layout_editor_absoluteY="96dp">
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/member_for"
android:textAlignment="center" />
<TextView
android:id="@+id/member_since_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAlignment="center"
tools:layout_editor_absoluteX="88dp"
tools:layout_editor_absoluteY="167dp"
tools:text="6 Months" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -1,77 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fragment_user_page"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
style="@style/UserPageHeader"
<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent">
<!-- User name and account image -->
<LinearLayout
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<ImageView
android:id="@+id/user_account_image"
android:layout_width="@dimen/account_image_default_width"
android:layout_height="@dimen/account_image_default_height"
android:contentDescription="@string/user_image_description"
android:src="@drawable/default_account_image" />
<TextView
android:id="@+id/user_account_name"
style="@style/UserPageName"
android:layout_width="wrap_content"
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
app:tabTextColor="@android:color/darker_gray"
app:tabSelectedTextColor="@android:color/white"
app:tabIndicatorColor="@color/colorPrimary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="User name" />
app:tabMode="scrollable"/>
</android.support.design.widget.AppBarLayout>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<ImageView
android:id="@+id/create_post_button"
style="@style/AddUserPostButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/btn_show_create_form_description"
android:src="@android:drawable/ic_menu_add" />
</LinearLayout>
</FrameLayout>
<!-- Include post creation form -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/create_post_form"
layout="@layout/post_create_form" />
<!-- No post on user page notice -->
<TextView
android:id="@+id/no_post_notice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/notice_no_post_user_page"
android:layout_gravity="center"
android:layout_marginTop="10dp"/>
<!-- User posts -->
<FrameLayout
android:id="@+id/user_posts"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"/>
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>