mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2025-07-07 18:42:53 +00:00
Created Advanced User information fragment.
This commit is contained in:
85
app/src/main/res/layout/fragment_advanced_user_info.xml
Normal file
85
app/src/main/res/layout/fragment_advanced_user_info.xml
Normal 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>
|
@ -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>
|
@ -191,4 +191,8 @@
|
||||
<string name="notice_no_latest_posts">You do not have any latest posts to display here.</string>
|
||||
<string name="main_menu_search_user">Search user</string>
|
||||
<string name="activity_view_pdf_label">View PDF</string>
|
||||
<string name="title_activity_settings">Settings</string>
|
||||
<string name="tab_user_advanced_info">User Info</string>
|
||||
<string name="tab_posts">Posts</string>
|
||||
<string name="member_for">Member for</string>
|
||||
</resources>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
|
Reference in New Issue
Block a user