From 52b27971ffff6e57247ce06a7363cbaf37495d82 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 22 Sep 2019 21:28:28 +0800 Subject: Display comments count in the post. Display a comment and a save button in a post. Minor bugs fixed. --- app/src/main/res/layout/activity_main.xml | 2 +- app/src/main/res/layout/item_post.xml | 154 +++++++++++++++++++-------- app/src/main/res/layout/item_post_detail.xml | 153 ++++++++++++++++++++++---- 3 files changed, 243 insertions(+), 66 deletions(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 4cf0b16f..50207592 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -205,7 +205,7 @@ android:layout_height="24dp" android:layout_gravity="center_vertical" android:layout_marginEnd="32dp" - android:src="@drawable/ic_outline_lock_24px" + android:src="@drawable/ic_outline_lock" android:tint="@color/primaryTextColor"/> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" /> @@ -88,20 +87,26 @@ android:layout_height="wrap_content" android:padding="16dp"> - + app:layout_constraintTop_toTopOf="parent" + app:lib_setRoundedBGColor="@color/backgroundColorPrimaryDark" + app:lib_setRoundedBorderColor="@color/backgroundColorPrimaryDark" + app:lib_setRadius="3dp" + app:lib_setRoundedView="true" + app:lib_setShape="rectangle" /> - + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintHorizontal_bias="1" + app:lib_setRoundedBGColor="@color/colorAccent" + app:lib_setRoundedBorderColor="@color/colorAccent" + app:lib_setRadius="3dp" + app:lib_setRoundedView="true" + app:lib_setShape="rectangle" /> @@ -192,7 +204,8 @@ android:padding="4dp" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBGColor="@color/backgroundColorPrimaryDark" + app:lib_setRoundedBorderColor="@color/backgroundColorPrimaryDark" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -207,7 +220,8 @@ android:padding="4dp" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBGColor="@color/backgroundColorPrimaryDark" + app:lib_setRoundedBorderColor="@color/backgroundColorPrimaryDark" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -221,7 +235,7 @@ android:paddingStart="16dp" android:paddingEnd="16dp" android:textSize="?attr/font_12" - android:visibility="gone"/> + android:visibility="gone" /> - @@ -280,52 +294,98 @@ android:id="@+id/plus_button_item_post" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:padding="16dp" + android:padding="12dp" android:src="@drawable/ic_arrow_upward_black_24dp" - android:layout_centerVertical="true" android:tint="@android:color/tab_indicator_text" android:background="?actionBarItemBackground" android:clickable="true" - android:focusable="true"/> + android:focusable="true" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + android:textSize="?attr/font_12" + android:textStyle="bold" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/plus_button_item_post" /> + android:focusable="true" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@id/score_text_view_item_post" /> + + + + + + + android:focusable="true" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1" /> - + diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml index c0979ca8..c6dff0a7 100644 --- a/app/src/main/res/layout/item_post_detail.xml +++ b/app/src/main/res/layout/item_post_detail.xml @@ -13,7 +13,7 @@ - + app:layout_constraintTop_toTopOf="parent" + app:lib_setRoundedBGColor="@color/backgroundColorPrimaryDark" + app:lib_setRoundedBorderColor="@color/backgroundColorPrimaryDark" + app:lib_setRadius="3dp" + app:lib_setRoundedView="true" + app:lib_setShape="rectangle" /> - + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintHorizontal_bias="1" + app:lib_setRoundedBGColor="@color/colorAccent" + app:lib_setRoundedBorderColor="@color/colorAccent" + app:lib_setRadius="3dp" + app:lib_setRoundedView="true" + app:lib_setShape="rectangle" /> @@ -203,9 +219,9 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginStart="16dp" + android:padding="4dp" android:textSize="?attr/font_12" android:textColor="@android:color/white" - android:padding="4dp" android:visibility="gone" app:lib_setRadius="3dp" app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" @@ -274,7 +290,7 @@ android:tint="@android:color/tab_indicator_text" android:visibility="gone" /> - @@ -326,6 +342,107 @@ android:src="@drawable/ic_outline_share_24px" android:tint="@android:color/tab_indicator_text" /> - + --> + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3