1.完善论坛模块逻辑

2.完善调试信息弹窗
0515
panqihua 5 years ago
parent aa20cb47d5
commit 107a24f1ec
  1. 27
      app/build.gradle
  2. 4
      app/src/main/java/com/community/pocket/data/main/forum/ForumNewRequest.java
  3. 22
      app/src/main/java/com/community/pocket/data/main/forum/ForumPostRequest.java
  4. 16
      app/src/main/java/com/community/pocket/data/model/Active.java
  5. 10
      app/src/main/java/com/community/pocket/data/model/Forum.java
  6. 10
      app/src/main/java/com/community/pocket/data/model/ForumContent.java
  7. 10
      app/src/main/java/com/community/pocket/data/model/ForumType.java
  8. 26
      app/src/main/java/com/community/pocket/data/model/Score.java
  9. 1
      app/src/main/java/com/community/pocket/ui/main/ui/forum/ForumPost.java
  10. 58
      app/src/main/java/com/community/pocket/ui/main/ui/forum/data/ForumDataActivity.java
  11. 11
      app/src/main/java/com/community/pocket/ui/main/ui/forum/data/ForumDataResponse.java
  12. 12
      app/src/main/java/com/community/pocket/ui/main/ui/forum/post/ForumPostActiveFragment.java
  13. 24
      app/src/main/java/com/community/pocket/ui/main/ui/forum/post/ForumPostActiveViewModel.java
  14. 2
      app/src/main/java/com/community/pocket/ui/main/ui/forum/post/ForumPostComplainFragment.java
  15. 33
      app/src/main/java/com/community/pocket/ui/main/ui/forum/post/ForumPostFormState.java
  16. 15
      app/src/main/java/com/community/pocket/ui/main/ui/forum/post/ForumPostFragment.java
  17. 84
      app/src/main/java/com/community/pocket/ui/main/ui/forum/post/ForumPostScore.java
  18. 32
      app/src/main/java/com/community/pocket/ui/main/ui/forum/post/ForumPostScoreViewModel.java
  19. 1
      app/src/main/java/com/community/pocket/ui/main/ui/forum/post/QueryUserResponse.java
  20. 2
      app/src/main/java/com/community/pocket/ui/main/ui/visitor/appointment/VisitorAppointmentFragment.java
  21. 3
      app/src/main/java/com/community/pocket/ui/main/ui/visitor/appointment/VisitorPeopleResponse.java
  22. 16
      app/src/main/java/com/community/pocket/util/BuildType.java
  23. 106
      app/src/main/java/com/community/pocket/util/HttpUtil.java
  24. 9
      app/src/main/res/drawable/ic_close.xml
  25. 6
      app/src/main/res/layout/activity_login.xml
  26. 3
      app/src/main/res/layout/activity_register.xml
  27. 74
      app/src/main/res/layout/main/layout/debug.xml
  28. 42
      app/src/main/res/layout/main/layout/debug_alert.xml
  29. 24
      app/src/main/res/layout/main/layout/debug_title.xml
  30. 21
      app/src/main/res/layout/main/layout/forum/layout/activity_forum_data.xml
  31. 3
      app/src/main/res/layout/main/layout/forum/layout/forum.xml
  32. 45
      app/src/main/res/layout/main/layout/forum/layout/forum_data_active_content.xml
  33. 15
      app/src/main/res/layout/main/layout/forum/layout/forum_data_complain_content.xml
  34. 37
      app/src/main/res/layout/main/layout/forum/layout/forum_data_content.xml
  35. 15
      app/src/main/res/layout/main/layout/forum/layout/forum_data_score_content.xml
  36. 9
      app/src/main/res/layout/main/layout/forum/layout/forum_hot_fragment.xml
  37. 21
      app/src/main/res/layout/main/layout/forum/layout/forum_post_active_fragment.xml
  38. 4
      app/src/main/res/layout/main/layout/forum/layout/forum_post_complain_fragment.xml
  39. 3
      app/src/main/res/layout/main/layout/forum/layout/forum_post_fragment.xml
  40. 34
      app/src/main/res/layout/main/layout/forum/layout/forum_post_score_fragment.xml
  41. 3
      app/src/main/res/layout/main/layout/garbage/layout/garbage.xml
  42. 2
      app/src/main/res/layout/main/layout/visitor/layout/visitor.xml
  43. 3
      app/src/main/res/layout/resetpwd/layout/step1.xml
  44. 1
      app/src/main/res/layout/resetpwd/layout/step2.xml
  45. 5
      app/src/main/res/navigation/nav_forum_post_type.xml
  46. 27
      app/src/main/res/values-en-rUS/strings.xml
  47. 31
      app/src/main/res/values-zh-rCN/strings.xml
  48. 1
      app/src/main/res/values/data.xml
  49. 27
      app/src/main/res/values/strings.xml

@ -26,19 +26,21 @@ android {
versionName "1.0" versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
} }
buildTypes { buildTypes {
debug{ debug {
buildConfigField('String','API_HOST',"\""+RAP2_API_HOST+"\"") buildConfigField('String', 'API_HOST', "\"" + RAP2_API_HOST + "\"")
signingConfig=signingConfigs.debug signingConfig = signingConfigs.debug
} }
rap2debug { rap2debug {
buildConfigField('String','API_HOST',"\""+RAP2_API_HOST+"\"") buildConfigField('String', 'API_HOST', "\"" + RAP2_API_HOST + "\"")
signingConfig=signingConfigs.debug signingConfig = signingConfigs.debug
debuggable = true debuggable = true
} }
@ -46,14 +48,14 @@ android {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField('String','API_HOST',"\""+API_HOST+"\"") buildConfigField('String', 'API_HOST', "\"" + API_HOST + "\"")
signingConfig=signingConfigs.debug signingConfig = signingConfigs.debug
} }
serverdebug { serverdebug {
buildConfigField('String','API_HOST',"\""+API_HOST+"\"") buildConfigField('String', 'API_HOST', "\"" + API_HOST + "\"")
signingConfig=signingConfigs.debug signingConfig = signingConfigs.debug
debuggable = true debuggable = true
} }
} }
@ -64,8 +66,8 @@ android {
'src/main/res/layout/main', 'src/main/res/layout/main/layout', 'src/main/res/layout/main', 'src/main/res/layout/main/layout',
'src/main/res/layout/main/layout/forum', 'src/main/res/layout/main/layout/forum/layout', 'src/main/res/layout/main/layout/forum', 'src/main/res/layout/main/layout/forum/layout',
'src/main/res/layout/main/layout/visitor', 'src/main/res/layout/main/layout/visitor/layout', 'src/main/res/layout/main/layout/visitor', 'src/main/res/layout/main/layout/visitor/layout',
'src/main/res/layout/main/layout/info','src/main/res/layout/main/layout/info/layout', 'src/main/res/layout/main/layout/info', 'src/main/res/layout/main/layout/info/layout',
'src/main/res/layout/main/layout/garbage','src/main/res/layout/main/layout/garbage/layout' 'src/main/res/layout/main/layout/garbage', 'src/main/res/layout/main/layout/garbage/layout'
} }
} }
} }
@ -102,7 +104,8 @@ dependencies {
def room_version = '2.2.5' def room_version = '2.2.5'
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version" // For Kotlin use kapt instead of annotationProcessor annotationProcessor "androidx.room:room-compiler:$room_version"
// For Kotlin use kapt instead of annotationProcessor
// Test helpers // Test helpers
testImplementation "androidx.room:room-testing:$room_version" testImplementation "androidx.room:room-testing:$room_version"

@ -3,6 +3,7 @@ package com.community.pocket.data.main.forum;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;
import com.community.pocket.data.model.ForumStatus; import com.community.pocket.data.model.ForumStatus;
import com.community.pocket.data.model.ForumType;
import com.community.pocket.ui.main.ui.forum.news.ForumNewResponse; import com.community.pocket.ui.main.ui.forum.news.ForumNewResponse;
import com.community.pocket.util.HttpRequest; import com.community.pocket.util.HttpRequest;
import com.community.pocket.util.HttpUtil; import com.community.pocket.util.HttpUtil;
@ -33,6 +34,9 @@ public class ForumNewRequest {
new FormBody.Builder() new FormBody.Builder()
.add("status", ForumStatus.ok.name()) .add("status", ForumStatus.ok.name())
.add("currentPage", String.valueOf(page)) .add("currentPage", String.valueOf(page))
.add("forumType", ForumType.active.name())
.add("forumType", ForumType.score.name())
.add("forumType", ForumType.topic.name())
.build()); .build());
} }
} }

@ -3,6 +3,7 @@ package com.community.pocket.data.main.forum;
import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.MutableLiveData;
import com.community.pocket.data.model.ForumType;
import com.community.pocket.data.model.LocalToken; import com.community.pocket.data.model.LocalToken;
import com.community.pocket.ui.main.ui.forum.post.ForumPostResponse; import com.community.pocket.ui.main.ui.forum.post.ForumPostResponse;
import com.community.pocket.ui.main.ui.forum.post.QueryUserResponse; import com.community.pocket.ui.main.ui.forum.post.QueryUserResponse;
@ -30,17 +31,19 @@ public class ForumPostRequest {
//发送活动贴 //发送活动贴
@HttpRequest("/forum/sendActive") @HttpRequest("/forum/sendActive")
public void sendActive(MutableLiveData<ForumPostResponse> liveData, String title, String content, String activeStartTime, String activeEndTime, String activeScore) { public void sendActive(MutableLiveData<ForumPostResponse> liveData, String title, String content, String activeStartTime, String activeEndTime, String activeScore, String registrationDeadline) {
HttpUtil.getRequest(HttpUtil.Method.POST, HttpUtil.getRequest(HttpUtil.Method.POST,
new SimpleHttpParse<ForumPostResponse>(liveData).getInterface(ForumPostResponse.class), new SimpleHttpParse<ForumPostResponse>(liveData).getInterface(ForumPostResponse.class),
new FormBody.Builder() new FormBody.Builder()
.add("title", title) .add("title", title)
.add("content", content) .add("content", content)
.add("registrationDeadline", registrationDeadline)
.add("activeStartTime", activeStartTime) .add("activeStartTime", activeStartTime)
.add("activeEndTime", activeEndTime) .add("activeEndTime", activeEndTime)
.add("activeScore", activeScore) .add("activeScore", activeScore)
.add("token", LocalToken.getToken()) .add("token", LocalToken.getToken())
.add("username", LocalToken.getUsername()) .add("username", LocalToken.getUsername())
.add("forumType", ForumType.active.name())
.build()); .build());
} }
@ -55,6 +58,7 @@ public class ForumPostRequest {
.add("complain", complain) .add("complain", complain)
.add("token", LocalToken.getToken()) .add("token", LocalToken.getToken())
.add("username", LocalToken.getUsername()) .add("username", LocalToken.getUsername())
.add("forumType", ForumType.complan.name())
.build()); .build());
} }
@ -68,6 +72,7 @@ public class ForumPostRequest {
.add("content", content) .add("content", content)
.add("token", LocalToken.getToken()) .add("token", LocalToken.getToken())
.add("username", LocalToken.getUsername()) .add("username", LocalToken.getUsername())
.add("forumType", ForumType.topic.name())
.build()); .build());
} }
@ -81,4 +86,19 @@ public class ForumPostRequest {
.add("username", LocalToken.getUsername()) .add("username", LocalToken.getUsername())
.build()); .build());
} }
//发送结算贴
@HttpRequest("/forum/sendScore")
public void sendScore(MutableLiveData<ForumPostResponse> liveData, String title, String content, String activeScore) {
HttpUtil.getRequest(HttpUtil.Method.POST,
new SimpleHttpParse<ForumPostResponse>(liveData).getInterface(ForumPostResponse.class),
new FormBody.Builder()
.add("title", title)
.add("content", content)
.add("activeScore", activeScore)
.add("token", LocalToken.getToken())
.add("username", LocalToken.getUsername())
.add("forumType", ForumType.score.name())
.build());
}
} }

@ -3,12 +3,14 @@ package com.community.pocket.data.model;
public class Active { public class Active {
//帖子id //帖子id
private String id; private String id;
//报名截止日期
private String registrationDeadline;
//活动开始时间 //活动开始时间
private String activeStartTime; private String activeStartTime;
//活动结束时间 //活动结束时间
private String activeEndTime; private String activeEndTime;
//活动信用分 //活动信用分
private String activeScore; private Integer activeScore;
public String getId() { public String getId() {
return id; return id;
@ -18,6 +20,14 @@ public class Active {
this.id = id; this.id = id;
} }
public String getRegistrationDeadline() {
return registrationDeadline;
}
public void setRegistrationDeadline(String registrationDeadline) {
this.registrationDeadline = registrationDeadline;
}
public String getActiveStartTime() { public String getActiveStartTime() {
return activeStartTime; return activeStartTime;
} }
@ -34,11 +44,11 @@ public class Active {
this.activeEndTime = activeEndTime; this.activeEndTime = activeEndTime;
} }
public String getActiveScore() { public Integer getActiveScore() {
return activeScore; return activeScore;
} }
public void setActiveScore(String activeScore) { public void setActiveScore(Integer activeScore) {
this.activeScore = activeScore; this.activeScore = activeScore;
} }
} }

@ -24,6 +24,8 @@ public class Forum {
private Complain complainDto; private Complain complainDto;
private Score score;
public Active getActiveDto() { public Active getActiveDto() {
return activeDto; return activeDto;
} }
@ -103,4 +105,12 @@ public class Forum {
public void setStatus(ForumStatus status) { public void setStatus(ForumStatus status) {
this.status = status; this.status = status;
} }
public Score getScore() {
return score;
}
public void setScore(Score score) {
this.score = score;
}
} }

@ -14,7 +14,7 @@ public class ForumContent {
private Integer tower; private Integer tower;
//帖子正文 //帖子正文
private String content; private String content;
private MyInfo myInfo; private MyInfo info;
public String getHeadImg() { public String getHeadImg() {
return headImg; return headImg;
@ -56,11 +56,11 @@ public class ForumContent {
this.content = content; this.content = content;
} }
public MyInfo getMyInfo() { public MyInfo getInfo() {
return myInfo; return info;
} }
public void setMyInfo(MyInfo myInfo) { public void setInfo(MyInfo info) {
this.myInfo = myInfo; this.info = info;
} }
} }

@ -1,7 +1,15 @@
package com.community.pocket.data.model; package com.community.pocket.data.model;
/**
* 帖子类型
*/
public enum ForumType { public enum ForumType {
//悬赏
active, active,
//话题
topic, topic,
complan //投诉
complan,
//结算
score
} }

@ -0,0 +1,26 @@
package com.community.pocket.data.model;
/**
* 结算贴
*/
public class Score {
private String id;
//结算分数
private Integer activeScore;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getActiveScore() {
return activeScore;
}
public void setActiveScore(Integer activeScore) {
this.activeScore = activeScore;
}
}

@ -37,6 +37,7 @@ public abstract class ForumPost extends BaseFragment {
if (forumList.isEmpty()) { if (forumList.isEmpty()) {
Toast.makeText(getContext(), R.string.no_more_forum, Toast.LENGTH_LONG).show(); Toast.makeText(getContext(), R.string.no_more_forum, Toast.LENGTH_LONG).show();
} else { } else {
layout.removeViews(1, layout.getChildCount() - 1);
for (int i = 0; i < forumList.getList().size(); i++) { for (int i = 0; i < forumList.getList().size(); i++) {
final Forum forum = forumList.getList().get(i); final Forum forum = forumList.getList().get(i);

@ -19,11 +19,16 @@ import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.widget.NestedScrollView;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import com.community.pocket.R; import com.community.pocket.R;
import com.community.pocket.data.model.Active;
import com.community.pocket.data.model.Complain;
import com.community.pocket.data.model.Forum;
import com.community.pocket.data.model.ForumContent; import com.community.pocket.data.model.ForumContent;
import com.community.pocket.data.model.Score;
import com.community.pocket.ui.BaseActivity; import com.community.pocket.ui.BaseActivity;
import com.community.pocket.ui.listener.MyTextChange; import com.community.pocket.ui.listener.MyTextChange;
import com.community.pocket.ui.main.ui.share.Response; import com.community.pocket.ui.main.ui.share.Response;
@ -61,6 +66,10 @@ public class ForumDataActivity extends BaseActivity {
//弹窗控制 //弹窗控制
private Handler handler; private Handler handler;
//帖子类型信息
@ViewInject(R.id.other_content)
private LinearLayout otherContent;
//打开回贴弹窗按钮 //打开回贴弹窗按钮
@ViewInject(R.id.open_reply) @ViewInject(R.id.open_reply)
private Button openReply; private Button openReply;
@ -68,6 +77,10 @@ public class ForumDataActivity extends BaseActivity {
//帖子id //帖子id
private String forumId; private String forumId;
//滚动布局
@ViewInject(R.id.scrollview)
private NestedScrollView scrollView;
@Override @Override
protected void onCreate(final Bundle savedInstanceState) { protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -127,7 +140,7 @@ public class ForumDataActivity extends BaseActivity {
if (listForumDataResponse.getResult() == Response.Result.OK) { if (listForumDataResponse.getResult() == Response.Result.OK) {
List<ForumContent> forumContents = listForumDataResponse.getForumContentList(); List<ForumContent> forumContents = listForumDataResponse.getForumContentList();
initFirst(forumContents.get(0)); initFirst(forumContents.get(0), listForumDataResponse.getForum());
if (forumContents.size() > 1) { if (forumContents.size() > 1) {
createReply(forumContents.subList(1, forumContents.size())); createReply(forumContents.subList(1, forumContents.size()));
} }
@ -194,8 +207,45 @@ public class ForumDataActivity extends BaseActivity {
/** /**
* 初始化第一楼数据 * 初始化第一楼数据
*/ */
private void initFirst(ForumContent forumContent) { private void initFirst(ForumContent forumContent, Forum forum) {
setData(firstLayout, forumContent); setData(firstLayout, forumContent);
if (forum != null) {
View childView = null;
switch (forum.getForumType()) {
case active: {
Active active = forum.getActiveDto();
childView = View.inflate(getApplicationContext(), R.layout.forum_data_active_content, null);
TextView deadline = childView.findViewById(R.id.registration_deadline);
deadline.setText(getString(R.string.forum_show_registration_deadline, active.getRegistrationDeadline()));
TextView startTime = childView.findViewById(R.id.active_start_time);
startTime.setText(getString(R.string.forum_show_start_time, active.getActiveStartTime()));
TextView endTime = childView.findViewById(R.id.active_end_time);
endTime.setText(getString(R.string.forum_show_end_time, active.getActiveEndTime()));
TextView activeScore = childView.findViewById(R.id.active_score);
activeScore.setText(getString(R.string.forum_show_active_score, active.getActiveScore()));
}
break;
case score: {
Score score = forum.getScore();
childView = View.inflate(getApplicationContext(), R.layout.forum_data_score_content, null);
TextView activeScore = childView.findViewById(R.id.active_score);
activeScore.setText(getString(R.string.forum_show_active_score, score.getActiveScore()));
}
break;
case complan: {
Complain complain = forum.getComplainDto();
childView = View.inflate(getApplicationContext(), R.layout.forum_data_complain_content, null);
TextView $complain = childView.findViewById(R.id.complain);
$complain.setText(getString(R.string.forum_show_complain, complain.getComplain()));
}
break;
}
if (childView != null) {
otherContent.removeAllViews();
otherContent.addView(childView);
}
}
} }
/** /**
@ -211,7 +261,7 @@ public class ForumDataActivity extends BaseActivity {
* 创建楼层数据 * 创建楼层数据
*/ */
private void createReply(List<ForumContent> forumContentList) { private void createReply(List<ForumContent> forumContentList) {
replyLayout.removeAllViews(); replyLayout.removeViews(1, replyLayout.getChildCount() - 1);
for (ForumContent forumContent : forumContentList) { for (ForumContent forumContent : forumContentList) {
View view = View.inflate(this, R.layout.forum_data_content, null); View view = View.inflate(this, R.layout.forum_data_content, null);
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
@ -230,7 +280,7 @@ public class ForumDataActivity extends BaseActivity {
TextView name = view.findViewById(R.id.name); TextView name = view.findViewById(R.id.name);
name.setText(forumContent.getUsername()); name.setText(forumContent.getUsername());
TextView score = view.findViewById(R.id.score); TextView score = view.findViewById(R.id.score);
score.setText(String.valueOf(forumContent.getMyInfo().getCreditScore())); score.setText(getString(R.string.credit_score, forumContent.getInfo().getCreditScore()));
TextView time = view.findViewById(R.id.time); TextView time = view.findViewById(R.id.time);
time.setText(DateFormat.format(getString(R.string.dateformat), forumContent.getTime())); time.setText(DateFormat.format(getString(R.string.dateformat), forumContent.getTime()));
TextView tower = view.findViewById(R.id.tower); TextView tower = view.findViewById(R.id.tower);

@ -3,6 +3,7 @@ package com.community.pocket.ui.main.ui.forum.data;
import androidx.annotation.StringRes; import androidx.annotation.StringRes;
import com.community.pocket.R; import com.community.pocket.R;
import com.community.pocket.data.model.Forum;
import com.community.pocket.data.model.ForumContent; import com.community.pocket.data.model.ForumContent;
import com.community.pocket.ui.main.ui.share.Response; import com.community.pocket.ui.main.ui.share.Response;
import com.community.pocket.util.CustomMessage; import com.community.pocket.util.CustomMessage;
@ -18,6 +19,8 @@ import java.util.List;
public class ForumDataResponse extends Response<ForumDataResponse.Msg> { public class ForumDataResponse extends Response<ForumDataResponse.Msg> {
private List<ForumContent> forumContentList; private List<ForumContent> forumContentList;
private Forum forum;
List<ForumContent> getForumContentList() { List<ForumContent> getForumContentList() {
return forumContentList; return forumContentList;
} }
@ -26,6 +29,14 @@ public class ForumDataResponse extends Response<ForumDataResponse.Msg> {
this.forumContentList = forumContentList; this.forumContentList = forumContentList;
} }
public Forum getForum() {
return forum;
}
public void setForum(Forum forum) {
this.forum = forum;
}
enum Msg implements CustomMessage { enum Msg implements CustomMessage {
ok(R.string.forum_data_ok), ok(R.string.forum_data_ok),
fail(R.string.forum_data_fail), fail(R.string.forum_data_fail),

@ -40,6 +40,10 @@ public class ForumPostActiveFragment extends ForumPostContent {
@ViewInject(R.id.active_score) @ViewInject(R.id.active_score)
private EditText activeScore; private EditText activeScore;
//报名截止日期
@ViewInject(R.id.registration_deadline)
private EditText registrationDeadline;
private ForumPostActiveViewModel viewModel; private ForumPostActiveViewModel viewModel;
//日期格式提示 //日期格式提示
@ -68,6 +72,9 @@ public class ForumPostActiveFragment extends ForumPostContent {
if (forumPostFormState.getContentError() != null) { if (forumPostFormState.getContentError() != null) {
postContent.setError(getString(forumPostFormState.getContentError())); postContent.setError(getString(forumPostFormState.getContentError()));
} }
if (forumPostFormState.getRegistrationDeadlineError() != null) {
registrationDeadline.setError(getString(forumPostFormState.getRegistrationDeadlineError()));
}
if (forumPostFormState.getActiveStartTimeError() != null) { if (forumPostFormState.getActiveStartTimeError() != null) {
activeStartTime.setError(getString(forumPostFormState.getActiveStartTimeError())); activeStartTime.setError(getString(forumPostFormState.getActiveStartTimeError()));
} }
@ -88,11 +95,12 @@ public class ForumPostActiveFragment extends ForumPostContent {
TextWatcher textWatcher = new MyTextChange() { TextWatcher textWatcher = new MyTextChange() {
@Override @Override
public void afterTextChanged(Editable s) { public void afterTextChanged(Editable s) {
viewModel.postDataForumChanged(postTitle.getText().toString(), postContent.getText().toString(), activeStartTime.getText().toString(), activeEndTime.getText().toString(), activeScore.getText().toString()); viewModel.postDataForumChanged(postTitle.getText().toString(), postContent.getText().toString(), activeStartTime.getText().toString(), activeEndTime.getText().toString(), activeScore.getText().toString(), registrationDeadline.getText().toString());
} }
}; };
postTitle.addTextChangedListener(textWatcher); postTitle.addTextChangedListener(textWatcher);
postContent.addTextChangedListener(textWatcher); postContent.addTextChangedListener(textWatcher);
registrationDeadline.addTextChangedListener(textWatcher);
activeStartTime.addTextChangedListener(textWatcher); activeStartTime.addTextChangedListener(textWatcher);
activeEndTime.addTextChangedListener(textWatcher); activeEndTime.addTextChangedListener(textWatcher);
activeScore.addTextChangedListener(textWatcher); activeScore.addTextChangedListener(textWatcher);
@ -101,7 +109,7 @@ public class ForumPostActiveFragment extends ForumPostContent {
postButton.setOnClickListener(new View.OnClickListener() { postButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
viewModel.sendPost(postTitle.getText().toString(), postContent.getText().toString(), activeStartTime.getText().toString(), activeEndTime.getText().toString(), activeScore.getText().toString()); viewModel.sendPost(postTitle.getText().toString(), postContent.getText().toString(), activeStartTime.getText().toString(), activeEndTime.getText().toString(), activeScore.getText().toString(), registrationDeadline.getText().toString());
} }
}); });

@ -15,26 +15,30 @@ public class ForumPostActiveViewModel extends ForumPostViewModel {
} }
//校验表单状态 //校验表单状态
void postDataForumChanged(String title, String content, String activeStartTime, String activeEndTime, String activeScore) { void postDataForumChanged(String title, String content, String activeStartTime, String activeEndTime, String activeScore, String registrationDeadline) {
if (!ValidUtil.titleValid(title)) { if (!ValidUtil.titleValid(title)) {
forumPostFormState.setValue(new ForumPostFormState.Active(R.string.invalid_title, null, null, null, null)); forumPostFormState.setValue(new ForumPostFormState.Active(R.string.invalid_title, null, null, null, null, null));
} else if (!ValidUtil.notesValid(content)) { } else if (!ValidUtil.notesValid(content)) {
forumPostFormState.setValue(new ForumPostFormState.Active(null, R.string.invalid_post, null, null, null)); forumPostFormState.setValue(new ForumPostFormState.Active(null, R.string.invalid_post, null, null, null, null));
} else if (!ValidUtil.dateValid(registrationDeadline)) {
forumPostFormState.setValue(new ForumPostFormState.Active(null, null, null, null, null, R.string.invalid_date));
} else if (!ValidUtil.dateValid(activeStartTime)) { } else if (!ValidUtil.dateValid(activeStartTime)) {
forumPostFormState.setValue(new ForumPostFormState.Active(null, null, R.string.invalid_date, null, null)); forumPostFormState.setValue(new ForumPostFormState.Active(null, null, R.string.invalid_date, null, null, null));
} else if (!ValidUtil.before(registrationDeadline, activeStartTime)) {
forumPostFormState.setValue(new ForumPostFormState.Active(null, null, R.string.invalid_active_date_before, null, null, null));
} else if (!ValidUtil.dateValid(activeEndTime)) { } else if (!ValidUtil.dateValid(activeEndTime)) {
forumPostFormState.setValue(new ForumPostFormState.Active(null, null, null, R.string.invalid_date, null)); forumPostFormState.setValue(new ForumPostFormState.Active(null, null, null, R.string.invalid_date, null, null));
} else if (!ValidUtil.before(activeStartTime, activeEndTime)) { } else if (!activeStartTime.equals(activeEndTime) && !ValidUtil.before(activeStartTime, activeEndTime)) {
forumPostFormState.setValue(new ForumPostFormState.Active(null, null, null, R.string.invalid_date_before, null)); forumPostFormState.setValue(new ForumPostFormState.Active(null, null, null, R.string.invalid_date_before, null, null));
} else if (!ValidUtil.scoreValid(activeScore)) { } else if (!ValidUtil.scoreValid(activeScore)) {
forumPostFormState.setValue(new ForumPostFormState.Active(null, null, null, null, R.string.invalid_score)); forumPostFormState.setValue(new ForumPostFormState.Active(null, null, null, null, R.string.invalid_score, null));
} else { } else {
forumPostFormState.setValue(new ForumPostFormState.Active(true)); forumPostFormState.setValue(new ForumPostFormState.Active(true));
} }
} }
//发帖请求状态 //发帖请求状态
void sendPost(String title, String content, String activeStartTime, String activeEndTime, String activeScore) { void sendPost(String title, String content, String activeStartTime, String activeEndTime, String activeScore, String registrationDeadline) {
getRequest().sendActive(forumPostResponse, title, content, activeStartTime, activeEndTime, activeScore); getRequest().sendActive(forumPostResponse, title, content, activeStartTime, activeEndTime, activeScore, registrationDeadline);
} }
} }

@ -89,9 +89,11 @@ public class ForumPostComplainFragment extends ForumPostContent {
queryUserResponse.toast(getContext()); queryUserResponse.toast(getContext());
if (queryUserResponse.getResult() == Response.Result.OK) { if (queryUserResponse.getResult() == Response.Result.OK) {
if (!queryUserResponse.getPeopleList().isEmpty()) {
initSearch(queryUserResponse.getPeopleList()); initSearch(queryUserResponse.getPeopleList());
} }
} }
}
}); });
searchName.addTextChangedListener(new MyTextChange() { searchName.addTextChangedListener(new MyTextChange() {

@ -36,6 +36,7 @@ class ForumPostFormState {
return isDataValid; return isDataValid;
} }
//活动表单
static class Active extends ForumPostFormState { static class Active extends ForumPostFormState {
@Nullable @Nullable
private Integer activeStartTimeError; private Integer activeStartTimeError;
@ -43,16 +44,19 @@ class ForumPostFormState {
private Integer activeEndTimeError; private Integer activeEndTimeError;
@Nullable @Nullable
private Integer activeScore; private Integer activeScore;
@Nullable
private Integer registrationDeadlineError;
Active(boolean isDataValid) { Active(boolean isDataValid) {
super(isDataValid); super(isDataValid);
} }
Active(@Nullable Integer titleError, @Nullable Integer contentError, @Nullable Integer activeStartTimeError, @Nullable Integer activeEndTimeError, @Nullable Integer activeScore) { Active(@Nullable Integer titleError, @Nullable Integer contentError, @Nullable Integer activeStartTimeError, @Nullable Integer activeEndTimeError, @Nullable Integer activeScore, @Nullable Integer registrationDeadlineError) {
super(titleError, contentError); super(titleError, contentError);
this.activeStartTimeError = activeStartTimeError; this.activeStartTimeError = activeStartTimeError;
this.activeEndTimeError = activeEndTimeError; this.activeEndTimeError = activeEndTimeError;
this.activeScore = activeScore; this.activeScore = activeScore;
this.registrationDeadlineError = registrationDeadlineError;
} }
@Nullable @Nullable
@ -69,8 +73,14 @@ class ForumPostFormState {
Integer getActiveScore() { Integer getActiveScore() {
return activeScore; return activeScore;
} }
@Nullable
Integer getRegistrationDeadlineError() {
return registrationDeadlineError;
}
} }
//投诉表单
static class Complain extends ForumPostFormState { static class Complain extends ForumPostFormState {
@Nullable @Nullable
private Integer complainError; private Integer complainError;
@ -89,4 +99,25 @@ class ForumPostFormState {
return complainError; return complainError;
} }
} }
//结算表单
static class Score extends ForumPostFormState {
@Nullable
private Integer scoreError;
Score(@Nullable Integer titleError, @Nullable Integer contentError, @Nullable Integer scoreError) {
super(titleError, contentError);
this.scoreError = scoreError;
}
Score(boolean isDataValid) {
super(isDataValid);
}
@Nullable
Integer getScoreError() {
return scoreError;
}
}
} }

@ -4,7 +4,6 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.Spinner; import android.widget.Spinner;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -26,13 +25,6 @@ import java.util.Objects;
*/ */
@ContentView(R.layout.forum_post_fragment) @ContentView(R.layout.forum_post_fragment)
public class ForumPostFragment extends BaseFragment { public class ForumPostFragment extends BaseFragment {
/**
* 发送标题
*/
@ViewInject(R.id.post_title)
private EditText postTitle;
/** /**
* 帖子类型 * 帖子类型
*/ */
@ -69,11 +61,14 @@ public class ForumPostFragment extends BaseFragment {
nav.navigate(R.id.forumPostActiveFragment); nav.navigate(R.id.forumPostActiveFragment);
break; break;
case 1: case 1:
nav.navigate(R.id.forumPostTopicFragment); nav.navigate(R.id.forumPostScore);
break; break;
case 2: case 2:
nav.navigate(R.id.forumPostComplainFragment); nav.navigate(R.id.forumPostTopicFragment);
break; break;
case 3:
nav.navigate(R.id.forumPostComplainFragment);
} }
} }
} }

@ -0,0 +1,84 @@
package com.community.pocket.ui.main.ui.forum.post;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import androidx.annotation.Nullable;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import com.community.pocket.R;
import com.community.pocket.ui.listener.MyTextChange;
import com.community.pocket.util.PropertiesUtil;
import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;
/**
* 悬赏贴布局
*/
@ContentView(R.layout.forum_post_score_fragment)
public class ForumPostScore extends ForumPostContent {
private ForumPostScoreViewModel viewModel;
@ViewInject(R.id.active_score)
private EditText activeScore;
public static ForumPostScore newInstance() {
return new ForumPostScore();
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
viewModel = new ViewModelProvider.NewInstanceFactory().create(ForumPostScoreViewModel.class);
//监听表单校验状态
viewModel.getForumPostFormState().observe(getViewLifecycleOwner(), new Observer<ForumPostFormState.Score>() {
@Override
public void onChanged(ForumPostFormState.Score forumPostFormState) {
if (forumPostFormState == null) {
return;
}
if (forumPostFormState.getTitleError() != null) {
postTitle.setError(getString(forumPostFormState.getTitleError()));
}
if (forumPostFormState.getContentError() != null) {
postContent.setError(getString(forumPostFormState.getContentError()));
}
if (forumPostFormState.getScoreError() != null) {
activeScore.setError(getString(forumPostFormState.getScoreError(), PropertiesUtil.getIntValue("score.max")));
}
postButton.setEnabled(forumPostFormState.isDataValid());
}
});
//监听发帖状态
sendPost(viewModel);
TextWatcher textWatcher = new MyTextChange() {
@Override
public void afterTextChanged(Editable s) {
viewModel.scoreFormChanged(postTitle.getText().toString(), postContent.getText().toString(), activeScore.getText().toString());
}
};
postTitle.addTextChangedListener(textWatcher);
postContent.addTextChangedListener(textWatcher);
activeScore.addTextChangedListener(textWatcher);
//发帖操作
postButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewModel.sendScore(postTitle.getText().toString(), postContent.getText().toString(), activeScore.getText().toString());
}
});
}
}

@ -0,0 +1,32 @@
package com.community.pocket.ui.main.ui.forum.post;
import androidx.lifecycle.MutableLiveData;
import com.community.pocket.R;
import com.community.pocket.util.ValidUtil;
public class ForumPostScoreViewModel extends ForumPostViewModel {
private MutableLiveData<ForumPostFormState.Score> forumPostFormState = new MutableLiveData<>();
MutableLiveData<ForumPostFormState.Score> getForumPostFormState() {
return forumPostFormState;
}
//结算表单校验
void scoreFormChanged(String title, String content, String activeScore) {
if (!ValidUtil.titleValid(title)) {
forumPostFormState.setValue(new ForumPostFormState.Score(R.string.invalid_title, null, null));
} else if (!ValidUtil.notesValid(content)) {
forumPostFormState.setValue(new ForumPostFormState.Score(null, R.string.invalid_post, null));
} else if (!ValidUtil.scoreValid(activeScore)) {
forumPostFormState.setValue(new ForumPostFormState.Score(null, null, R.string.invalid_score));
} else {
forumPostFormState.setValue(new ForumPostFormState.Score(true));
}
}
//发送结算贴贴
void sendScore(String title, String content, String activeScore) {
getRequest().sendScore(forumPostResponse, title, content, activeScore);
}
}

@ -28,6 +28,7 @@ public class QueryUserResponse extends Response<QueryUserResponse.Msg> {
enum Msg implements CustomMessage { enum Msg implements CustomMessage {
ok(R.string.forum_search_people_ok), ok(R.string.forum_search_people_ok),
ok_empty(R.string.not_match_people),
fail(R.string.forum_search_people_fail); fail(R.string.forum_search_people_fail);
private Integer msg; private Integer msg;

@ -148,9 +148,11 @@ public class VisitorAppointmentFragment extends BaseFragment {
visitorResponse.toast(getContext()); visitorResponse.toast(getContext());
if (visitorResponse.getResult() == Response.Result.OK) { if (visitorResponse.getResult() == Response.Result.OK) {
if (!visitorResponse.getVisitorPeopleList().isEmpty()) {
initSearch(visitorResponse.getVisitorPeopleList()); initSearch(visitorResponse.getVisitorPeopleList());
} }
} }
}
}); });
appointment.addTextChangedListener(new MyTextChange() { appointment.addTextChangedListener(new MyTextChange() {

@ -25,7 +25,8 @@ public class VisitorPeopleResponse extends Response<VisitorPeopleResponse.Msg> {
enum Msg implements CustomMessage { enum Msg implements CustomMessage {
ok(R.string.visitor_appointment_people_ok), ok(R.string.visitor_appointment_people_ok),
fail(R.string.visitor_appointment_people_fail); fail(R.string.visitor_appointment_people_fail),
ok_empty(R.string.not_match_people);
private Integer msg; private Integer msg;

@ -0,0 +1,16 @@
package com.community.pocket.util;
public enum BuildType {
rap2debug("rap2"),
serverdebug("springboot");
private String name;
BuildType(String name) {
this.name = name;
}
public String getName() {
return name;
}
}

@ -1,10 +1,21 @@
package com.community.pocket.util; package com.community.pocket.util;
import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Looper; import android.os.Looper;
import android.util.Patterns;
import android.util.TypedValue;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.community.pocket.BuildConfig; import com.community.pocket.BuildConfig;
import com.community.pocket.R; import com.community.pocket.R;
@ -12,6 +23,8 @@ import com.community.pocket.R;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -66,13 +79,96 @@ public class HttpUtil {
public void onFailure(@NotNull Call call, @NotNull IOException e) { public void onFailure(@NotNull Call call, @NotNull IOException e) {
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
Looper.prepare(); Looper.prepare();
if (BuildConfig.API_HOST.contains("http")) { AlertDialog.Builder builder = new AlertDialog.Builder(context);
new AlertDialog.Builder(context) View view = View.inflate(context, R.layout.debug_title, null);
.setMessage(context.getString(R.string.check_server_fail, BuildConfig.API_HOST)).show(); ImageView imageView = view.findViewById(R.id.close);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
View confirm = View.inflate(context, R.layout.debug_alert, null);
AlertDialog.Builder dialog = new AlertDialog.Builder(context);
dialog.setView(confirm);
final AlertDialog alertDialog = dialog.create();
confirm.findViewById(R.id.yes).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
System.exit(0);
}
});
confirm.findViewById(R.id.no).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
alertDialog.dismiss();
}
});
alertDialog.show();
}
});
builder.setCustomTitle(view);
if (Patterns.WEB_URL.matcher(BuildConfig.API_HOST).matches()) {
ConstraintLayout constraintLayout = (ConstraintLayout) View.inflate(context, R.layout.debug, null);
TextView buildType = constraintLayout.findViewById(R.id.build_type);
buildType.setText(context.getString(R.string.build_type, BuildConfig.BUILD_TYPE));
TextView url = constraintLayout.findViewById(R.id.url);
url.setText(context.getString(R.string.server_host, BuildConfig.API_HOST));
TextView detailError = constraintLayout.findViewById(R.id.detailError);
StringWriter stringWriter = new StringWriter();
PrintWriter printWriter = new PrintWriter(stringWriter);
e.printStackTrace(printWriter);
detailError.setText(stringWriter.toString());
Button openUrl = constraintLayout.findViewById(R.id.open_url);
TextView error = constraintLayout.findViewById(R.id.error);
LinearLayout linearLayout = constraintLayout.findViewById(R.id.my_layout);
int index = linearLayout.indexOfChild(error);
TextView testPort = new TextView(context);
TextView mode = constraintLayout.findViewById(R.id.mode);
switch (BuildType.valueOf(BuildConfig.BUILD_TYPE)) {
case rap2debug:
testPort.setText(R.string.rap2_error);
mode.setText(context.getString(R.string.debug_mode, BuildType.rap2debug.getName()));
break;
case serverdebug:
testPort.setText(R.string.server_error);
mode.setText(context.getString(R.string.debug_mode, BuildType.serverdebug.getName()));
break;
}
testPort.setSingleLine(false);
testPort.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 20);
testPort.setGravity(error.getGravity());
linearLayout.addView(testPort, index + 1);
openUrl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//从其他浏览器打开
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
Uri content_url = Uri.parse(BuildConfig.API_HOST);
intent.setData(content_url);
Activity activity = (Activity) context;
activity.startActivity(Intent.createChooser(intent, context.getString(R.string.choose_browser)));
}
});
// int[] buttonId=new int[]{R.id.button,R.id.button2};
// View.OnClickListener onClickListener=new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// System.exit(0);
// }
// };
// for(int id:buttonId){
// view.findViewById(id).setOnClickListener(onClickListener);
// }
builder.setView(constraintLayout);
} else { } else {
new AlertDialog.Builder(context) builder.setMessage(context.getString(R.string.error_api_host, BuildConfig.API_HOST));
.setMessage(context.getString(R.string.error_api_host, BuildConfig.API_HOST)).show();
} }
builder.show();
Looper.loop(); Looper.loop();
} }
} }

@ -0,0 +1,9 @@
<vector android:height="50dp"
android:viewportHeight="1024"
android:viewportWidth="1024"
android:width="50dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#FF000000"
android:pathData="M810.67,273.49L750.51,213.33 512,451.84 273.49,213.33 213.33,273.49 451.84,512 213.33,750.51 273.49,810.67 512,572.16 750.51,810.67 810.67,750.51 572.16,512z" />
</vector>

@ -22,8 +22,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titlebar" app:layout_constraintTop_toBottomOf="@id/titlebar">
tools:layout_constraintStart_toStartOf="parent">
<EditText <EditText
android:id="@+id/username" android:id="@+id/username"
@ -36,8 +35,7 @@
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
app:layout_constraintEnd_toStartOf="@id/login_to_resetPwd" app:layout_constraintEnd_toStartOf="@id/login_to_resetPwd"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
tools:layout_constraintEnd_toStartOf="@id/login_to_resetPwd" />
<EditText <EditText
android:id="@+id/password" android:id="@+id/password"

@ -19,8 +19,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titlebar" app:layout_constraintTop_toBottomOf="@id/titlebar">
tools:layout_constraintStart_toStartOf="parent">
<EditText <EditText
android:id="@+id/username" android:id="@+id/username"

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/my_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/build_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="24sp" />
<TextView
android:id="@+id/mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="24sp" />
<TextView
android:id="@+id/url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="18sp" />
<TextView
android:id="@+id/error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/connect_server_error"
android:textSize="24sp" />
<Button
android:id="@+id/open_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_30"
android:text="@string/open_url"
android:textSize="24sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_30"
android:gravity="center"
android:text="@string/error_log"
android:textSize="24sp" />
<TextView
android:id="@+id/detailError"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="false"
android:textColor="#F44336" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/exit_app"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/confirm">
<TextView
android:id="@+id/yes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/YES"
android:textSize="24sp" />
<TextView
android:id="@+id/no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/NO"
android:textSize="24sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
android:text="@string/debug"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/close"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/headimg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_close" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -32,26 +32,25 @@
android:text="@string/forum_reply" /> android:text="@string/forum_reply" />
</LinearLayout> </LinearLayout>
<include
android:id="@+id/first_layout"
layout="@layout/forum_data_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/button_layout" />
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scrollview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:fillViewport="true" android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/first_layout"> app:layout_constraintTop_toBottomOf="@id/button_layout">
<LinearLayout <LinearLayout
android:id="@+id/reply_layout" android:id="@+id/reply_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" /> android:orientation="vertical">
<include
android:id="@+id/first_layout"
layout="@layout/forum_data_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -10,8 +10,7 @@
android:id="@+id/titlebar" android:id="@+id/titlebar"
layout="@layout/form_titlebar" layout="@layout/form_titlebar"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
tools:layout_constraintEnd_toEndOf="parent" />
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_body" android:id="@+id/scroll_body"

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/registration_deadline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/active_start_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/registration_deadline" />
<TextView
android:id="@+id/active_end_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/active_start_time" />
<TextView
android:id="@+id/active_score"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/active_end_time" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/complain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/border"> android:background="@drawable/border">
@ -25,8 +24,7 @@
android:textSize="36sp" android:textSize="36sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/headimg" app:layout_constraintStart_toEndOf="@+id/headimg"
app:layout_constraintTop_toTopOf="@id/headimg" app:layout_constraintTop_toTopOf="@id/headimg" />
tools:layout_constraintStart_toEndOf="@id/headimg" />
<TextView <TextView
android:id="@+id/score" android:id="@+id/score"
@ -38,8 +36,7 @@
android:textSize="36sp" android:textSize="36sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/headimg" app:layout_constraintStart_toEndOf="@+id/headimg"
app:layout_constraintTop_toBottomOf="@id/name" app:layout_constraintTop_toBottomOf="@id/name" />
tools:layout_constraintStart_toEndOf="@id/headimg" />
<TextView <TextView
android:id="@+id/time" android:id="@+id/time"
@ -51,8 +48,7 @@
android:textSize="18sp" android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/headimg" app:layout_constraintStart_toEndOf="@+id/headimg"
app:layout_constraintTop_toBottomOf="@id/score" app:layout_constraintTop_toBottomOf="@id/score" />
tools:layout_constraintStart_toEndOf="@id/headimg" />
<TextView <TextView
android:id="@+id/tower" android:id="@+id/tower"
@ -64,14 +60,35 @@
android:textSize="18sp" android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/headimg" app:layout_constraintStart_toEndOf="@+id/headimg"
app:layout_constraintTop_toBottomOf="@id/time" app:layout_constraintTop_toBottomOf="@id/time" />
tools:layout_constraintStart_toEndOf="@id/headimg" />
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:id="@+id/other_content"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="0dp"-->
<!-- android:layout_marginTop="32dp"-->
<!-- android:background="@color/colorAccent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@id/headimg">-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<LinearLayout
android:id="@+id/other_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:background="@drawable/border"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tower" />
<TextView <TextView
android:id="@+id/content" android:id="@+id/content"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="32dp" android:layout_marginTop="32dp"
android:background="@drawable/border"
android:ems="10" android:ems="10"
android:gravity="start|top" android:gravity="start|top"
android:importantForAutofill="no" android:importantForAutofill="no"
@ -79,6 +96,6 @@
android:textSize="24sp" android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/headimg" /> app:layout_constraintTop_toBottomOf="@id/other_content" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/active_score"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -34,8 +34,7 @@
android:textSize="24sp" android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
tools:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
@ -56,8 +55,7 @@
android:textSize="24sp" android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
tools:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
@ -78,8 +76,7 @@
android:textSize="24sp" android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
tools:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>

@ -35,6 +35,18 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/registration_deadline"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/prompt_registration_deadline"
android:importantForAutofill="no"
android:inputType="date"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tip" />
<EditText <EditText
android:id="@+id/active_start_time" android:id="@+id/active_start_time"
android:layout_width="0dp" android:layout_width="0dp"
@ -45,8 +57,7 @@
android:inputType="date" android:inputType="date"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tip" app:layout_constraintTop_toBottomOf="@id/registration_deadline" />
tools:layout_constraintTop_toBottomOf="@id/post_content" />
<EditText <EditText
android:id="@+id/active_end_time" android:id="@+id/active_end_time"
@ -58,8 +69,7 @@
android:inputType="date" android:inputType="date"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/active_start_time" app:layout_constraintTop_toBottomOf="@id/active_start_time" />
tools:layout_constraintTop_toBottomOf="@id/active_start_time" />
<EditText <EditText
android:id="@+id/active_score" android:id="@+id/active_score"
@ -72,8 +82,7 @@
android:inputType="number" android:inputType="number"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/active_end_time" app:layout_constraintTop_toBottomOf="@id/active_end_time" />
tools:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -26,8 +26,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
app:layout_constraintTop_toBottomOf="@id/search_name" app:layout_constraintStart_toStartOf="parent"
tools:layout_constraintStart_toStartOf="parent" /> app:layout_constraintTop_toBottomOf="@id/search_name" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout> </FrameLayout>

@ -33,8 +33,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:entries="@array/post_type_list" android:entries="@array/post_type_list"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/post_title" app:layout_constraintTop_toBottomOf="@id/post_title" />
tools:layout_constraintStart_toStartOf="parent" />
<androidx.fragment.app.FragmentContainerView <androidx.fragment.app.FragmentContainerView
android:id="@+id/post_type_fragment" android:id="@+id/post_type_fragment"

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
tools:context=".ui.main.ui.forum.post.ForumPostScore">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/post_content_layout"
layout="@layout/forum_post_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/active_score"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="@string/prompt_active_score"
android:importantForAutofill="no"
android:inputType="number"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/post_content_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

@ -23,6 +23,5 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titlebar" app:layout_constraintTop_toBottomOf="@id/titlebar"
app:navGraph="@navigation/garbage_navigation" app:navGraph="@navigation/garbage_navigation" />
tools:layout_constraintTop_toBottomOf="@id/titlebar" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

@ -11,7 +11,7 @@
layout="@layout/visitor_titlebar" layout="@layout/visitor_titlebar"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintEnd_toEndOf="parent" />
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_body" android:id="@+id/scroll_body"

@ -31,8 +31,7 @@
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/username" app:layout_constraintTop_toBottomOf="@id/username" />
tools:layout_constraintTop_toBottomOf="@id/username" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp" android:layout_width="0dp"

@ -32,7 +32,6 @@
app:layout_constraintEnd_toStartOf="@id/sendcode" app:layout_constraintEnd_toStartOf="@id/sendcode"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/username" app:layout_constraintTop_toBottomOf="@+id/username"
tools:layout_constraintTop_toBottomOf="@id/username"
tools:ignore="TextFields" tools:ignore="TextFields"
android:importantForAutofill="no" /> android:importantForAutofill="no" />

@ -20,4 +20,9 @@
android:name="com.community.pocket.ui.main.ui.forum.post.ForumPostComplainFragment" android:name="com.community.pocket.ui.main.ui.forum.post.ForumPostComplainFragment"
android:label="forum_post_complain_fragment" android:label="forum_post_complain_fragment"
tools:layout="@layout/forum_post_complain_fragment" /> tools:layout="@layout/forum_post_complain_fragment" />
<fragment
android:id="@+id/forumPostScore"
android:name="com.community.pocket.ui.main.ui.forum.post.ForumPostScore"
android:label="forum_post_score_fragment"
tools:layout="@layout/forum_post_score_fragment" />
</navigation> </navigation>

@ -172,11 +172,10 @@
<string name="modify_oldpwd_fail">modify error</string> <string name="modify_oldpwd_fail">modify error</string>
<string name="prompt_choose_date">please choose date</string> <string name="prompt_choose_date">please choose date</string>
<string name="visitor_invalid_date">date error</string> <string name="visitor_invalid_date">date error</string>
<string name="forum_status_ok">check ok</string> <string name="forum_status_ok">check OK</string>
<string name="forum_status_fail">check fail</string> <string name="forum_status_fail">check fail</string>
<string name="forum_status_uncheck">uncheck</string> <string name="forum_status_uncheck">uncheck</string>
<string name="check_server_ok">connect server ok</string> <string name="check_server_ok">connect server OK</string>
<string name="check_server_fail">connect server:%1s fail</string>
<string name="error_api_host">api error%1s</string> <string name="error_api_host">api error%1s</string>
<string name="garbage_category_1">recoverable</string> <string name="garbage_category_1">recoverable</string>
<string name="garbage_category_2">hazardous waste</string> <string name="garbage_category_2">hazardous waste</string>
@ -194,4 +193,26 @@
<string name="visitor_is_people">is out people</string> <string name="visitor_is_people">is out people</string>
<string name="visitor_check_fail">check fail</string> <string name="visitor_check_fail">check fail</string>
<string name="visitor_traffic_permit">traffic permit</string> <string name="visitor_traffic_permit">traffic permit</string>
<string name="prompt_registration_deadline">please input registration deadline</string>
<string name="invalid_active_date_before">deadline must be before start date</string>
<string name="forum_show_active_score">active_score:%1d</string>
<string name="forum_show_registration_deadline">registration deadline:%1s</string>
<string name="forum_show_start_time">start time:%1s</string>
<string name="forum_show_end_time">end time:%1s</string>
<string name="build_type">build type:%1s</string>
<string name="server_host">server host:%1s</string>
<string name="connect_server_error">connect server error</string>
<string name="debug">debug</string>
<string name="error_log">error log</string>
<string name="open_url">open url</string>
<string name="choose_browser">choose browser</string>
<string name="rap2_error">rap2 service</string>
<string name="server_error">server error</string>
<string name="debug_mode">debug mode:%1s</string>
<string name="exit_app">exit app?</string>
<string name="YES">YES</string>
<string name="NO">NO</string>
<string name="post_type_score">score</string>
<string name="not_match_people">not match people</string>
<string name="forum_show_complain">complain:%1s</string>
</resources> </resources>

@ -48,9 +48,9 @@
<string name="notice_content_load">加载公告内容中。。。。</string> <string name="notice_content_load">加载公告内容中。。。。</string>
<string name="notice_time">公告时间:%1s</string> <string name="notice_time">公告时间:%1s</string>
<string name="dateformat">yyyy-MM-dd HH:mm:ss</string> <string name="dateformat">yyyy-MM-dd HH:mm:ss</string>
<string name="active_user">活跃用户</string> <string name="active_user">信用榜</string>
<string name="hot_topic">热门动态</string> <string name="hot_topic">热门动态</string>
<string name="hot_events">热门活动</string> <string name="hot_events">热门悬赏</string>
<string name="hot_rank">%1d.%2s</string> <string name="hot_rank">%1d.%2s</string>
<string name="poster">发帖人:%1s</string> <string name="poster">发帖人:%1s</string>
<string name="post_time">发帖时间:%1s</string> <string name="post_time">发帖时间:%1s</string>
@ -61,7 +61,7 @@
<string name="prompt_active_start_time">请输入活动开始时间</string> <string name="prompt_active_start_time">请输入活动开始时间</string>
<string name="prompt_active_end_time">请输入活动结束时间</string> <string name="prompt_active_end_time">请输入活动结束时间</string>
<string name="prompt_active_score">请输入活动分数</string> <string name="prompt_active_score">请输入活动分数</string>
<string name="post_type_activity">志愿活动</string> <string name="post_type_activity">悬赏</string>
<string name="post_type_topic">动态</string> <string name="post_type_topic">动态</string>
<string name="post_type_complain">投诉</string> <string name="post_type_complain">投诉</string>
<string name="complain_name">投诉人:%1s</string> <string name="complain_name">投诉人:%1s</string>
@ -166,7 +166,7 @@
<string name="register_fail_email_repeat">邮箱%1s已绑定</string> <string name="register_fail_email_repeat">邮箱%1s已绑定</string>
<string name="unknow_error">未知错误,请联系管理员</string> <string name="unknow_error">未知错误,请联系管理员</string>
<string name="login_fail">登陆失败,账号或密码错误</string> <string name="login_fail">登陆失败,账号或密码错误</string>
<string name="invalid_date_before">开始日期必须小于结束日期</string> <string name="invalid_date_before">开始日期必须小于等于结束日期</string>
<string name="invalid_token">身份有效期已过,请重新登录</string> <string name="invalid_token">身份有效期已过,请重新登录</string>
<string name="no_more_forum">没有更多帖子</string> <string name="no_more_forum">没有更多帖子</string>
<string name="modify_oldpwd_fail">修改密码失败,原密码不正确</string> <string name="modify_oldpwd_fail">修改密码失败,原密码不正确</string>
@ -176,7 +176,6 @@
<string name="forum_status_fail">审核不通过</string> <string name="forum_status_fail">审核不通过</string>
<string name="forum_status_uncheck">未审核</string> <string name="forum_status_uncheck">未审核</string>
<string name="check_server_ok">连接服务端成功</string> <string name="check_server_ok">连接服务端成功</string>
<string name="check_server_fail">调试信息:无法连接到服务端:%1s</string>
<string name="error_api_host">非法服务端配置:%1s</string> <string name="error_api_host">非法服务端配置:%1s</string>
<string name="garbage_category_1">可回收垃圾</string> <string name="garbage_category_1">可回收垃圾</string>
<string name="garbage_category_2">有害垃圾</string> <string name="garbage_category_2">有害垃圾</string>
@ -194,4 +193,26 @@
<string name="visitor_is_people">是否外来人口预约</string> <string name="visitor_is_people">是否外来人口预约</string>
<string name="visitor_check_fail">审核不通过</string> <string name="visitor_check_fail">审核不通过</string>
<string name="visitor_traffic_permit">通行证</string> <string name="visitor_traffic_permit">通行证</string>
<string name="prompt_registration_deadline">请输入报名截止日期</string>
<string name="invalid_active_date_before">报名截止日期必须小于活动开始日期</string>
<string name="forum_show_active_score">奖励信用分:%1d</string>
<string name="forum_show_registration_deadline">报名截止日期:%1s</string>
<string name="forum_show_start_time">活动开始日期:%1s</string>
<string name="forum_show_end_time">活动结束日期:%1s</string>
<string name="build_type">构建类型:%1s</string>
<string name="server_host">服务端地址:%1s</string>
<string name="connect_server_error">无法连接服务端</string>
<string name="debug">调试信息</string>
<string name="error_log">" 异常信息"</string>
<string name="open_url">尝试使用浏览器打开服务端</string>
<string name="choose_browser">请选择浏览器</string>
<string name="rap2_error">请按照以下步骤检查:\n1.rap2服务端ip地址是否正确\n2.rap2服务是否已启动\n3.浏览器是否能访问rap2的web服务(默认:3000端口)</string>
<string name="server_error">请按照以下步骤检查:\n1.springboot服务端ip地址是否正确\n2.mongo数据库服务是否已启动\n3.springboot服务端是否已启动</string>
<string name="debug_mode">%1s联调模式</string>
<string name="exit_app">是否退出应用?</string>
<string name="YES"></string>
<string name="NO"></string>
<string name="post_type_score">结算</string>
<string name="not_match_people">无法匹配任何用户</string>
<string name="forum_show_complain">投诉人:%1s</string>
</resources> </resources>

@ -3,6 +3,7 @@
<!-- 帖子发送类型--> <!-- 帖子发送类型-->
<string-array name="post_type_list"> <string-array name="post_type_list">
<item>@string/post_type_activity</item> <item>@string/post_type_activity</item>
<item>@string/post_type_score</item>
<item>@string/post_type_topic</item> <item>@string/post_type_topic</item>
<item>@string/post_type_complain</item> <item>@string/post_type_complain</item>
</string-array> </string-array>

@ -173,11 +173,10 @@
<string name="modify_oldpwd_fail">modify error</string> <string name="modify_oldpwd_fail">modify error</string>
<string name="prompt_choose_date">please choose date</string> <string name="prompt_choose_date">please choose date</string>
<string name="visitor_invalid_date">date error</string> <string name="visitor_invalid_date">date error</string>
<string name="forum_status_ok">check ok</string> <string name="forum_status_ok">check OK</string>
<string name="forum_status_fail">check fail</string> <string name="forum_status_fail">check fail</string>
<string name="forum_status_uncheck">uncheck</string> <string name="forum_status_uncheck">uncheck</string>
<string name="check_server_ok">connect server ok</string> <string name="check_server_ok">connect server OK</string>
<string name="check_server_fail">connect server:%1s fail</string>
<string name="error_api_host">api error%1s</string> <string name="error_api_host">api error%1s</string>
<string name="garbage_category_1">recoverable</string> <string name="garbage_category_1">recoverable</string>
<string name="garbage_category_2">hazardous waste</string> <string name="garbage_category_2">hazardous waste</string>
@ -195,6 +194,28 @@
<string name="visitor_is_people">is out people</string> <string name="visitor_is_people">is out people</string>
<string name="visitor_check_fail">check fail</string> <string name="visitor_check_fail">check fail</string>
<string name="visitor_traffic_permit">traffic permit</string> <string name="visitor_traffic_permit">traffic permit</string>
<string name="prompt_registration_deadline">please input registration deadline</string>
<string name="invalid_active_date_before">deadline must be before start date</string>
<string name="forum_show_active_score">active_score:%1d</string>
<string name="forum_show_registration_deadline">registration deadline:%1s</string>
<string name="forum_show_start_time">start time:%1s</string>
<string name="forum_show_end_time">end time:%1s</string>
<string name="build_type">build type:%1s</string>
<string name="server_host">server host:%1s</string>
<string name="connect_server_error">connect server error</string>
<string name="debug">debug</string>
<string name="error_log">error log</string>
<string name="open_url">open url</string>
<string name="choose_browser">choose browser</string>
<string name="rap2_error">rap2 service</string>
<string name="server_error">server error</string>
<string name="debug_mode">debug mode:%1s</string>
<string name="exit_app">exit app?</string>
<string name="YES">YES</string>
<string name="NO">NO</string>
<string name="post_type_score">score</string>
<string name="not_match_people">not match people</string>
<string name="forum_show_complain">complain:%1s</string>
<!-- Strings used for fragments for navigation --> <!-- Strings used for fragments for navigation -->
<!-- Strings used for fragments for navigation --> <!-- Strings used for fragments for navigation -->

Loading…
Cancel
Save