From 189c764cb72564cb008f4f51034e037a6dff3bbf Mon Sep 17 00:00:00 2001 From: panqihua <1029559041@qq.com> Date: Sat, 28 Mar 2020 22:55:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=9C=80=E6=96=B0=E5=B8=96?= =?UTF-8?q?=E5=AD=90=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/main/ui/forum/ForumNewFragment.java | 4 +++ .../layout/main/layout/forum/layout/post.xml | 29 ++++++++++++++----- app/src/main/res/values-en-rUS/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/community/pocket/ui/main/ui/forum/ForumNewFragment.java b/app/src/main/java/com/community/pocket/ui/main/ui/forum/ForumNewFragment.java index 72bb93d..1107e4a 100644 --- a/app/src/main/java/com/community/pocket/ui/main/ui/forum/ForumNewFragment.java +++ b/app/src/main/java/com/community/pocket/ui/main/ui/forum/ForumNewFragment.java @@ -1,5 +1,6 @@ package com.community.pocket.ui.main.ui.forum; +import android.annotation.SuppressLint; import android.os.Bundle; import android.text.format.DateFormat; import android.view.View; @@ -37,6 +38,7 @@ public class ForumNewFragment extends BaseFragment { /** * 加载最新帖子 */ + @SuppressLint("SetTextI18n") private void loadPost(View view) { //TODO 测试数据 for (int i = 0; i < 10; i++) { @@ -47,6 +49,8 @@ public class ForumNewFragment extends BaseFragment { content.setText("内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容" + i); TextView author = childView.findViewById(R.id.poster); author.setText(getString(R.string.poster, "发帖人" + i)); + TextView postReply = childView.findViewById(R.id.post_reply); + postReply.setText(getString(R.string.post_reply, 0)); TextView time = childView.findViewById(R.id.post_time); Date date = new Date(); date.setTime(System.currentTimeMillis()); diff --git a/app/src/main/res/layout/main/layout/forum/layout/post.xml b/app/src/main/res/layout/main/layout/forum/layout/post.xml index fa4a0b8..4f15de2 100644 --- a/app/src/main/res/layout/main/layout/forum/layout/post.xml +++ b/app/src/main/res/layout/main/layout/forum/layout/post.xml @@ -41,16 +41,31 @@ app:layout_constraintStart_toEndOf="@id/headimg" app:layout_constraintTop_toTopOf="@id/headimg" /> - + app:layout_constraintTop_toBottomOf="@id/post_content"> + + + + + + app:layout_constraintTop_toBottomOf="@id/author_layout" /> \ No newline at end of file diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml index c83fc66..52e24b7 100644 --- a/app/src/main/res/values-en-rUS/strings.xml +++ b/app/src/main/res/values-en-rUS/strings.xml @@ -71,4 +71,5 @@ wordcount:%1d/%2d please input complain name post + reply:%1d \ No newline at end of file diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 5699631..7c49c1a 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -71,4 +71,5 @@ 您还可以输入%1d/%2d " 请选择投诉人" 发帖 + 回复 :%1d \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4e9dd39..6233ad3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -72,6 +72,7 @@ wordcount:%1d/%2d please input complain name post + reply:%1d