Created post create form.

This commit is contained in:
Pierre
2018-04-01 00:15:01 +02:00
parent a4e8ada1c7
commit 0558f77aed
8 changed files with 181 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ListView android:id="@+id/posts_list"
<org.communiquons.android.comunic.client.ui.views.NestedListView android:id="@+id/posts_list"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:id="@+id/fragment_user_page"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
style="@style/UserPageHeader"
@ -21,19 +21,37 @@
android:id="@+id/user_account_image"
android:layout_width="@dimen/account_image_default_width"
android:layout_height="@dimen/account_image_default_height"
android:src="@drawable/default_account_image"
android:contentDescription="@string/user_image_description"/>
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:layout_height="wrap_content"
tools:text="User name"/>
tools:text="User name" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<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 -->
<include
android:id="@+id/create_post_form"
layout="@layout/post_create_form" />
<!-- User posts -->
<FrameLayout
android:id="@+id/user_posts"
@ -41,4 +59,8 @@
android:layout_height="0dp"
android:layout_weight="1" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"/>
</LinearLayout>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- New post content -->
<EditText
android:id="@+id/new_post_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:hint="@string/new_post_hint"
android:lines="3"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" />
<!-- Submit post -->
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/post_action_send"
android:layout_gravity="end" />
</LinearLayout>