diff --git a/common/src/main/java/com/yunbao/common/adapter/CommentAdapter.java b/common/src/main/java/com/yunbao/common/adapter/CommentAdapter.java index feddc6805..13f467ba6 100644 --- a/common/src/main/java/com/yunbao/common/adapter/CommentAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/CommentAdapter.java @@ -161,7 +161,7 @@ public class CommentAdapter extends RecyclerView.Adapter { del.setVisibility(View.GONE); } if (bean.getReplyCommentList() != null) { - replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>"); + replyCount.setText(String.format(mContext.getResources().getString(R.string.active_count), String.valueOf(bean.getReplyCommentList().size()))); if (bean.getReplyCommentList().size() > 0) { report1.setTag(bean.getReplyCommentList().get(0)); del1.setTag(bean.getReplyCommentList().get(0)); @@ -214,10 +214,11 @@ public class CommentAdapter extends RecyclerView.Adapter { public void onClick(View v) { if (!bean.isShow()) { recyclerView.setVisibility(View.VISIBLE); - replyCount.setText("收起"); + replyCount.setText(mContext.getResources().getString(R.string.close)); } else { recyclerView.setVisibility(View.GONE); - replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>"); + replyCount.setText(String.format(mContext.getResources().getString(R.string.active_count), String.valueOf(bean.getReplyCommentList().size()))) + ; } bean.setShow(!bean.isShow()); } diff --git a/common/src/main/java/com/yunbao/common/adapter/CommentVideoAdapter.java b/common/src/main/java/com/yunbao/common/adapter/CommentVideoAdapter.java index 0818c13a9..d67bee6e9 100644 --- a/common/src/main/java/com/yunbao/common/adapter/CommentVideoAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/CommentVideoAdapter.java @@ -162,7 +162,7 @@ public class CommentVideoAdapter extends RefreshAdapter { del.setVisibility(View.GONE); } if (bean.getReplyCommentList() != null) { - replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>"); + replyCount.setText( String.format(mContext.getResources().getString(R.string.active_count), String.valueOf(bean.getReplyCommentList().size()))); if (bean.getReplyCommentList().size() > 0) { del1.setTag(bean.getReplyCommentList().get(0)); replyContent.setText(bean.getReplyCommentList().get(0).getContent()); @@ -214,10 +214,10 @@ public class CommentVideoAdapter extends RefreshAdapter { public void onClick(View v) { if (!bean.isShow()) { recyclerView.setVisibility(View.VISIBLE); - replyCount.setText("收起"); + replyCount.setText(mContext.getResources().getString(R.string.close)); } else { recyclerView.setVisibility(View.GONE); - replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>"); + replyCount.setText( String.format(mContext.getResources().getString(R.string.active_count), String.valueOf(bean.getReplyCommentList().size()))); } bean.setShow(!bean.isShow()); } diff --git a/common/src/main/res/layout/activity_community_details.xml b/common/src/main/res/layout/activity_community_details.xml index f55bb38fa..c6e484e63 100644 --- a/common/src/main/res/layout/activity_community_details.xml +++ b/common/src/main/res/layout/activity_community_details.xml @@ -81,7 +81,7 @@ @@ -255,7 +257,7 @@ android:layout_height="40dp" android:layout_weight="1" android:background="@color/transparent" - android:hint="说点什么..." + android:hint="@string/video_say_something" android:paddingLeft="5dp" android:paddingRight="5dp" android:textSize="14dp" /> diff --git a/common/src/main/res/layout/activity_community_send.xml b/common/src/main/res/layout/activity_community_send.xml index 4c5a02589..0221414ba 100644 --- a/common/src/main/res/layout/activity_community_send.xml +++ b/common/src/main/res/layout/activity_community_send.xml @@ -183,7 +183,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_weight="1" - android:text="立即发表" + android:text="" android:textColor="#333333" android:textSize="12dp" android:visibility="invisible" /> diff --git a/common/src/main/res/layout/activity_user_home.xml b/common/src/main/res/layout/activity_user_home.xml index 4004f148f..d5c505085 100644 --- a/common/src/main/res/layout/activity_user_home.xml +++ b/common/src/main/res/layout/activity_user_home.xml @@ -801,7 +801,7 @@ android:layout_width="30dp" android:layout_height="30dp" android:src="@mipmap/icon_right_gray" - android:visibility="invisible" /> + android:visibility="visible" /> diff --git a/common/src/main/res/layout/item_comment_reply_view.xml b/common/src/main/res/layout/item_comment_reply_view.xml index b647ac5ab..80fc1ab46 100644 --- a/common/src/main/res/layout/item_comment_reply_view.xml +++ b/common/src/main/res/layout/item_comment_reply_view.xml @@ -46,7 +46,7 @@ android:gravity="center" android:paddingLeft="8dp" android:paddingRight="8dp" - android:text="作者" + android:text="@string/active_author" android:textColor="@color/white" android:textSize="12dp" android:visibility="gone" /> @@ -61,7 +61,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" - android:text="删除" + android:text="@string/delete" android:textColor="#777777" android:textSize="11dp" android:visibility="gone" /> @@ -72,7 +72,7 @@ android:layout_height="wrap_content" android:layout_marginRight="5dp" android:padding="10dp" - android:text="举报" + android:text="@string/report" android:textColor="#333333" android:textSize="11dp" android:textStyle="bold" /> diff --git a/common/src/main/res/layout/item_comment_video_view.xml b/common/src/main/res/layout/item_comment_video_view.xml index 6322df90c..a7bd31295 100644 --- a/common/src/main/res/layout/item_comment_video_view.xml +++ b/common/src/main/res/layout/item_comment_video_view.xml @@ -59,7 +59,7 @@ android:gravity="center" android:paddingLeft="8dp" android:paddingRight="8dp" - android:text="作者" + android:text="@string/active_author" android:textColor="@color/white" android:textSize="10dp" android:visibility="gone" /> @@ -75,7 +75,7 @@ android:layout_height="wrap_content" android:layout_marginTop="10dp" android:padding="10dp" - android:text="删除" + android:text="@string/delete" android:textColor="#777777" android:textSize="11dp" android:visibility="gone" /> @@ -97,7 +97,7 @@ android:layout_marginTop="10dp" android:layout_marginRight="5dp" android:padding="10dp" - android:text="举报" + android:text="@string/report" android:textColor="#333333" android:textSize="11dp" android:textStyle="bold" /> @@ -148,7 +148,7 @@ android:gravity="center" android:paddingLeft="8dp" android:paddingRight="8dp" - android:text="作者" + android:text="@string/active_author" android:textColor="@color/white" android:textSize="11dp" android:visibility="gone" /> @@ -163,7 +163,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" - android:text="删除" + android:text="@string/delete" android:textColor="#777777" android:textSize="11dp" android:visibility="gone" /> @@ -174,7 +174,7 @@ android:layout_height="wrap_content" android:layout_marginRight="5dp" android:padding="10dp" - android:text="举报" + android:text="@string/report" android:textColor="#333333" android:textSize="11dp" android:textStyle="bold" /> @@ -203,7 +203,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="30dp" android:layout_marginTop="5dp" - android:text="共4条回复>" + android:text="@string/active_count" android:textColor="#FF4874" android:textSize="12dp" android:textStyle="bold" diff --git a/common/src/main/res/layout/item_comment_view.xml b/common/src/main/res/layout/item_comment_view.xml index 558e3cc05..61cf8c693 100644 --- a/common/src/main/res/layout/item_comment_view.xml +++ b/common/src/main/res/layout/item_comment_view.xml @@ -56,7 +56,7 @@ android:gravity="center" android:paddingLeft="8dp" android:paddingRight="8dp" - android:text="作者" + android:text="@string/active_author" android:textColor="@color/white" android:textSize="10dp" android:visibility="gone" /> @@ -72,7 +72,7 @@ android:layout_height="wrap_content" android:layout_marginTop="10dp" android:padding="10dp" - android:text="删除" + android:text="@string/delete" android:textColor="#777777" android:textSize="11dp" android:visibility="gone" /> @@ -145,7 +145,7 @@ android:gravity="center" android:paddingLeft="8dp" android:paddingRight="8dp" - android:text="作者" + android:text="@string/active_author" android:textColor="@color/white" android:textSize="11dp" android:visibility="gone" /> @@ -160,7 +160,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" - android:text="删除" + android:text="@string/delete" android:textColor="#777777" android:textSize="11dp" android:visibility="gone" /> @@ -200,7 +200,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="30dp" android:layout_marginTop="5dp" - android:text="共4条回复>" + android:text="@string/active_count" android:textColor="#FF4874" android:textSize="12dp" android:textStyle="bold" diff --git a/common/src/main/res/values-en-rUS/strings.xml b/common/src/main/res/values-en-rUS/strings.xml index e7c059f1d..4aef2d31d 100644 --- a/common/src/main/res/values-en-rUS/strings.xml +++ b/common/src/main/res/values-en-rUS/strings.xml @@ -30,4 +30,9 @@ Time cannot be greater than the current time Do you confirm deletion? Cannot blackmail oneself + author + altogether %1$s strip reply> + Uploading... + Upload failed + Please fill in the publication content \ No newline at end of file diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index e2ad7e6f5..e106620fb 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1474,7 +1474,7 @@ 删除成功 最多添加9張圖片 不感興趣 - 人觉得很赞 + 人覺得很讚 主播守護團 主播粉絲團 美圖 @@ -1495,4 +1495,9 @@ 时间不能大于当前时间 是否確認刪除? 不能拉黑自己 + 作者 + 共%1$s條回復> + 上傳中... + 上傳失敗 + 請填寫發佈內容 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index dfdb542d3..c56676737 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1474,7 +1474,7 @@ 删除成功 最多添加9張圖片 不感興趣 - 人觉得很赞 + 人覺得很讚 主播守護團 主播粉絲團 美圖 @@ -1495,4 +1495,9 @@ 时间不能大于当前时间 是否確認刪除? 不能拉黑自己 + 作者 + 共%1$s條回復> + 上傳中... + 上傳失敗 + 請填寫發佈內容 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 02643bf8f..4ece6915d 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1472,7 +1472,7 @@ 删除成功 最多添加9張圖片 不感興趣 - 人觉得很赞 + 人覺得很讚 主播守護團 主播粉絲團 美圖 @@ -1493,4 +1493,9 @@ 时间不能大于当前时间 是否確認刪除? 不能拉黑自己 + 作者 + 共%1$s條回復> + 上傳中... + 上傳失敗 + 請填寫發佈內容 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 2ad802e0c..50a60c65c 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -557,7 +557,7 @@ Video download successful Video download failed No more videos - comment + Comment I can\'t give myself a compliment No comment for the moment. Grab the sofa Reply @@ -1494,7 +1494,7 @@ Limited ride And limited avatar frame 删除成功 最多添加9張圖片 不感興趣 - 人觉得很赞 + 人覺得很讚 主播守護團 主播粉絲團 美圖 @@ -1515,6 +1515,10 @@ Limited ride And limited avatar frame 时间不能大于当前时间 是否確認刪除? 不能拉黑自己 - + 作者 + 共%1$s條回復> + 上傳中... + 上傳失敗 + 請填寫發佈內容 diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveNewWishListAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveNewWishListAdapter.java index d35160118..be95e4092 100644 --- a/live/src/main/java/com/yunbao/live/adapter/LiveNewWishListAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/LiveNewWishListAdapter.java @@ -156,7 +156,7 @@ public class LiveNewWishListAdapter extends RecyclerView.Adapter newCommunityTypeList = new ArrayList<>(); int talkId; + Dialog dialog; + @Override protected int getLayoutId() { return R.layout.activity_community_send; @@ -110,6 +114,25 @@ public class CommunitySendActivity extends AbsActivity { submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { + if (StringUtil.isEmpty(content.getText().toString())) { + ToastUtil.show(mContext.getResources().getString(com.yunbao.main.R.string.please_input_content)); + return; + } + if (isImage) { + if (imgUrlList.size() == 0) { + ToastUtil.show(mContext.getResources().getString(com.yunbao.main.R.string.please_input_content)); + return; + } + } else { + if (videoFile == null) { + ToastUtil.show(mContext.getResources().getString(com.yunbao.main.R.string.please_input_content)); + return; + } + } + if (StringUtil.isEmpty(talkContent.getText().toString())) { + ToastUtil.show(mContext.getResources().getString(com.yunbao.main.R.string.please_input_content)); + return; + } List uploadBeanList = new ArrayList<>(); if (isImage) { for (int i = 0; i < activeImageAdapter.getImageFileList().size(); i++) { @@ -222,15 +245,6 @@ public class CommunitySendActivity extends AbsActivity { } private void submit() { - if (isImage) { - if (imgUrlList.size() == 0) { - return; - } - } else { - if (StringUtil.isEmpty(videoUrl)) { - return; - } - } String imgUrl = ""; if (isImage) { imgUrl = new Gson().toJson(imgUrlList); @@ -244,6 +258,9 @@ public class CommunitySendActivity extends AbsActivity { CommonHttpUtil.pushCommunity(isImage, jsonObject.toString(), String.valueOf(talkId), imgUrl, videoUrl, tempTime, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { + if (dialog != null) { + dialog.dismiss(); + } ToastUtil.show(msg); if (code == 0) { finish(); @@ -384,10 +401,14 @@ public class CommunitySendActivity extends AbsActivity { if (mUploadStrategy == null) { mUploadStrategy = new UploadQnImpl(mContext); } + dialog = DialogUitl.loadingDialog(mContext, mContext.getResources().getString(com.yunbao.main.R.string.uploading)); + dialog.show(); mUploadStrategy.upload(uploadBeans, true, new UploadCallback() { @Override public void onFinish(List list, boolean success) { if (!success) { + dialog.dismiss(); + ToastUtil.show(mContext.getResources().getString(com.yunbao.main.R.string.upload_fail)); return; } if (isImage) { @@ -402,4 +423,12 @@ public class CommunitySendActivity extends AbsActivity { } }, isImg); } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (dialog != null) { + dialog.dismiss(); + } + } } diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java index db1c41fab..51147479d 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java @@ -248,7 +248,7 @@ public class UserHomeActivity extends AbsActivity { likeCount.setText(String.valueOf(userInfo.getUserHomeTopInfo().getUser_love_num()));//关注数量 if (isMe) { - findViewById(R.id.setting).setVisibility(View.VISIBLE); + findViewById(R.id.setting).setVisibility(View.INVISIBLE); bottomEditLayout.setVisibility(View.VISIBLE); imgUp.setVisibility(View.VISIBLE); imgLabel.setVisibility(View.VISIBLE); @@ -307,7 +307,7 @@ public class UserHomeActivity extends AbsActivity { if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getAge())) { tagList.add(userInfo.getUserHomeTopInfo().getAge() + (WordUtil.isNewZh() ? "歲" : "years old")); } - if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getHeight())) { + if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getHeight()) && !userInfo.getUserHomeTopInfo().getHeight().equals("0")) { tagList.add(userInfo.getUserHomeTopInfo().getHeight() + "cm"); } if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getCareer())) { diff --git a/main/src/main/java/com/yunbao/main/dialog/ConversationPopuwWindow.java b/main/src/main/java/com/yunbao/main/dialog/ConversationPopuwWindow.java index 1dd2c0600..ea19f1f98 100644 --- a/main/src/main/java/com/yunbao/main/dialog/ConversationPopuwWindow.java +++ b/main/src/main/java/com/yunbao/main/dialog/ConversationPopuwWindow.java @@ -42,7 +42,7 @@ public class ConversationPopuwWindow implements View.OnClickListener { private void initView() { tvBlack = popupView.findViewById(com.yunbao.live.R.id.tv_black); tvBlack.setOnClickListener(this); - tvBlack.setText("删除"); + tvBlack.setText(mContext.getResources().getString(R.string.delete)); } diff --git a/video/src/main/java/com/yunbao/video/views/VideoCommentViewHolder.java b/video/src/main/java/com/yunbao/video/views/VideoCommentViewHolder.java index d9497654e..b3aba28ae 100644 --- a/video/src/main/java/com/yunbao/video/views/VideoCommentViewHolder.java +++ b/video/src/main/java/com/yunbao/video/views/VideoCommentViewHolder.java @@ -27,6 +27,7 @@ import com.yunbao.common.adapter.CommentVideoAdapter; import com.yunbao.common.adapter.RefreshAdapter; import com.yunbao.common.bean.CommentBean; import com.yunbao.common.custom.CommonRefreshView; +import com.yunbao.common.custom.ItemDecoration; import com.yunbao.common.custom.MyLinearLayout3; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.CommonHttpUtil; @@ -35,6 +36,7 @@ import com.yunbao.common.utils.L; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.AbsViewHolder; +import com.yunbao.common.views.TopGradual; import com.yunbao.live.activity.LiveReportActivity; import com.yunbao.video.R; import com.yunbao.video.activity.AbsVideoCommentActivity; @@ -127,6 +129,8 @@ public class VideoCommentViewHolder extends AbsViewHolder implements View.OnClic mCommentNum = (TextView) findViewById(R.id.comment_num); mRefreshView = (CommonRefreshView) findViewById(R.id.refreshView); mRefreshView.setEmptyLayoutId(R.layout.view_no_data_comment); + ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 5, 0); + mRefreshView.setItemDecoration(decoration); mRefreshView.setLoadMoreEnable(false); mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false) { @Override