MusicBottomFunctionBar.java
24.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
package com.wd.common.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.wd.common.interact.collect.CollectTools;
import com.wd.common.interact.collect.callback.CollectCallback;
import com.wd.common.interact.interacts.callback.IInteractDataListener;
import com.wd.common.interact.interacts.fetcher.InteractFetcher;
import com.wd.common.interact.like.LikeTools;
import com.wd.common.interact.like.QueryLikeStatusTools;
import com.wd.common.interact.like.callback.LikeCallback;
import com.wd.common.interact.like.callback.QueryLikeStatusCallback;
import com.wd.common.listener.AddFavoriteLabelCallback;
import com.wd.foundation.wdkit.utils.PDUtils;
import com.wd.common.utils.ProcessUtils;
import com.wd.common.utils.ToolsUtil;
import com.wd.fastcoding.base.R;
import com.wd.foundation.bean.comment.DisplayWorkInfoBean;
import com.wd.foundation.bean.comment.TransparentBean;
import com.wd.foundation.bean.custom.collect.AddDelCollectBean;
import com.wd.foundation.bean.response.InteractResponseDataBean;
import com.wd.foundation.wdkit.utils.NumberStrUtils;
import com.wd.foundation.wdkit.utils.SpUtils;
import com.wd.foundation.wdkit.utils.ToastNightUtil;
import com.wd.foundation.wdkit.view.AnimationView;
import com.wd.foundation.wdkitcore.tools.ArrayUtils;
import com.wd.foundation.wdkitcore.tools.StringUtils;
import java.util.ArrayList;
import java.util.List;
/**
* @Author 张泽昊
* @date:2023/5/9
* @desc:音频详情底部评论tab
*/
public class MusicBottomFunctionBar extends FrameLayout {
private String commentNum;
private String likeNum;
/**
* 整体视图
*/
private ConstraintLayout clBg;
/**
* 头部分割线
*/
private View topLine;
/**
* 返回按钮
*/
private ImageView backIv;
/**
* 输入框
*/
private View inputView;
/**
* 评论图标
*/
private ImageView commentIv;
/**
* 评论数
*/
private TextView commentNumTv;
private LinearLayout commentNumLayout;
private boolean mCloseComment;
/**
* 点赞按钮
*/
private AnimationView likeIv;
/**
* 收藏按钮
*/
private AnimationView collectIv;
/**
* 分享按钮
*/
private ImageView shareView;
/**
* 黑色还是白色
*/
private boolean isBlack;
private CommentFunctionListener commentFunctionListener;
private TextView ciTvLikeNum;
private LinearLayout likeNumLayout;
private ImageView ivlikeleft,ivlikeright,ivcommentleft,ivcommentright;
/**
* 当前内容id、内容类型
*/
private String contentId;
private String contentType;
private String contentRelId = "0";
private String relType = "0";
private String likeStatus = "0";
public String collectStatus = "0";
private int likesStyle = 1;
// 是否开启点赞 1是 0否
private int openLikes = 0;
private int rmhPlatform = 0;
private String title = "";
private String channelId = "";
/**
* 工作线程
*/
private WorkThreadHandler mHandler;
private boolean closeLikesIcon;
/**
* 加载框
*/
// private Dialog mLoadingDialog;
public MusicBottomFunctionBar(@NonNull Context context) {
super(context);
init(context, null);
}
public MusicBottomFunctionBar(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init(context, attrs);
}
public MusicBottomFunctionBar(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context, attrs);
}
public String getCommentNum() {
if(TextUtils.isEmpty(commentNum)){
return "0";
}
return commentNum;
}
public String getLikeNum() {
if(TextUtils.isEmpty(likeNum)){
return "0";
}
return likeNum;
}
/**
* 初始化
*/
private void init(Context context, AttributeSet attrs) {
if (attrs != null) {
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.BottomCommentFunctionBar);
isBlack = a.getBoolean(R.styleable.BottomCommentFunctionBar_black_bar, false);
a.recycle();
}
View rootView = LayoutInflater.from(context).inflate(R.layout.layout_black_comment_input_bottom, null);
initView(rootView);
addListener();
this.addView(rootView);
initHandler(context);
}
/**
* 初始化线程
*/
private void initHandler(Context context) {
// mLoadingDialog = DialogUtils.creatRequestDialog(context, true);
HandlerThread handlerThread = new HandlerThread("realLocService");
handlerThread.start();
mHandler = new WorkThreadHandler(handlerThread.getLooper());
}
/**
* 初始化控件
*/
private void initView(View rootView) {
clBg = rootView.findViewById(R.id.cl_bg);
topLine = rootView.findViewById(R.id.ci_top_line);
backIv = rootView.findViewById(R.id.ci_iv_back);
inputView = rootView.findViewById(R.id.ci_input_FL);
commentIv = rootView.findViewById(R.id.ci_iv_comment);
commentNumTv = rootView.findViewById(R.id.ci_tv_comment_num);
commentNumLayout = rootView.findViewById(R.id.ll_comment_count);
likeIv = rootView.findViewById(R.id.ci_iv_like);
collectIv = rootView.findViewById(R.id.ci_iv_collect);
shareView = rootView.findViewById(R.id.ci_iv_share);
likeNumLayout = rootView.findViewById(R.id.ll_like_count);
ciTvLikeNum = rootView.findViewById(R.id.ci_tv_like_num);
ivlikeleft = rootView.findViewById(R.id.ivlikeleft);
ivlikeleft.setImageResource(R.mipmap.icon_num_music_bg_start);
ciTvLikeNum.setBackgroundResource(R.mipmap.icon_num_music_bg_middle);
ivlikeright = rootView.findViewById(R.id.ivlikeright);
ivlikeright.setImageResource(R.mipmap.icon_num_music_bg_end);
ivcommentleft = rootView.findViewById(R.id.ivcommentleft);
ivcommentleft.setImageResource(R.mipmap.icon_num_music_bg_start);
commentNumTv.setBackgroundResource(R.mipmap.icon_num_music_bg_middle);
ivcommentright = rootView.findViewById(R.id.ivcommentright);
ivcommentright.setImageResource(R.mipmap.icon_num_music_bg_end);
// 验证登录
likeIv.setNeedLogin(true);
collectIv.setNeedLogin(true);
}
/**
* 增加接口回调监听
*/
private void addListener() {
backIv.setOnClickListener(v -> {
if (commentFunctionListener != null) {
commentFunctionListener.backClick();
}
});
inputView.setOnClickListener(v -> {
if (commentFunctionListener != null) {
commentFunctionListener.inputClick();
}
});
commentIv.setOnClickListener(v -> {
if (commentFunctionListener != null) {
commentFunctionListener.commentClick();
}
});
likeIv.setOnClickListener(v -> {
//用户点击
if (!PDUtils.isLogin()) {
if (commentFunctionListener != null) {
commentFunctionListener.likeClick("-1");
}
ProcessUtils.toOneKeyLoginActivity();
return;
}
Message message = new Message();
message.what = 1;
if (null != mHandler) {
mHandler.sendMessage(message);
}
});
collectIv.setOnClickListener(v -> {
//用户点击
if (!PDUtils.isLogin()) {
if (commentFunctionListener != null) {
commentFunctionListener.collectClick("-1");
}
ProcessUtils.toOneKeyLoginActivity();
return;
}
Message message = new Message();
message.what = 2;
if (null != mHandler) {
mHandler.sendMessage(message);
}
});
shareView.setOnClickListener(v -> {
if (commentFunctionListener != null) {
commentFunctionListener.shareClick();
}
});
}
/**
* 关闭返回
*/
public void setBgColor(int color) {
clBg.setBackgroundColor(color);
topLine.setBackgroundColor(color);
}
/**
* 关闭返回
*/
public void hideBack() {
backIv.setVisibility(GONE);
}
/**
* 关闭点赞
*/
public void closeLike() {
likeNumLayout.setVisibility(GONE);
likeNumShow(false);
}
/**
* 关闭收藏
*/
public void closeCollect() {
collectIv.setVisibility(GONE);
}
/**
* 关闭分享
*/
public void closeShare() {
shareView.setVisibility(GONE);
}
public void setShareMoreIcon(){
if (shareView != null){
shareView.setImageResource(R.mipmap.share_more_icon_white_40);
}
}
/**
* 关闭分享
*/
public void showShare() {
shareView.setVisibility(VISIBLE);
}
/**
* 关闭评论,GONE后,评论,点赞布局会左移,先隐藏处理不打乱布局
*/
public void closeComment(boolean close) {
if(close){
mCloseComment = true;
inputView.setVisibility(View.INVISIBLE);
commentNumLayout.setVisibility(View.GONE);
commentIv.setVisibility(View.GONE);
commentNumShow(false);
}else{
mCloseComment = false;
inputView.setVisibility(View.VISIBLE);
// commentNumLayout.setVisibility(View.VISIBLE);
commentIv.setVisibility(View.VISIBLE);
setCommentNum("");
}
}
/**
* 不显示评论输入框
*/
public void hideInputView() {
inputView.setVisibility(GONE);
}
/**
* 设置评论数
*/
public void setCommentNum(String commentNum) {
this.commentNum = commentNum;
String comment = NumberStrUtils.Companion.getINSTANCE().handlerNumber(String.valueOf(commentNum));
if("0".equals(comment)){
comment="";
}
if (!TextUtils.isEmpty(comment)) {
commentNumTv.setText(comment);
// commentIv.setImageResource(R.mipmap.icon_bottom_white_commented);
commentNumShow(true);
} else {
commentNumShow(false);
// commentIv.setImageResource(R.mipmap.icon_bottom_white_comment);
}
}
/**
* 设置点赞数
*/
public void updateLikeNum(String msg) {
likeStatus = msg;
String comment = null;
//点赞
if("1".equals(msg)){
if(TextUtils.isEmpty(likeNum)){
comment = "1";
}else{
comment = String.valueOf(Integer.parseInt(likeNum)+1);
}
likeNum = comment;
likeIv.setSelected(true);
}else{
//取消点赞
if(TextUtils.isEmpty(likeNum)){
comment = "0";
}else{
comment = String.valueOf(Integer.parseInt(likeNum)-1);
}
likeNum = comment;
likeIv.setSelected(false);
}
comment = NumberStrUtils.Companion.getINSTANCE().handlerNumber(comment);
if("0".equals(comment)){
comment="";
}
if (!TextUtils.isEmpty(comment)) {
ciTvLikeNum.setText(comment);
likeNumShow(true);
} else {
likeNumShow(false);
}
}
/**
* 设置点赞数
*/
public void setLikeNum(String likeNum) {
this.likeNum = likeNum;
String comment = NumberStrUtils.Companion.getINSTANCE().handlerNumber(String.valueOf(likeNum));
if("0".equals(comment)){
comment="";
}
if (!TextUtils.isEmpty(comment)) {
ciTvLikeNum.setText(comment);
likeNumShow(true);
} else {
likeNumShow(false);
}
}
public void collectIcon(int select) {
collectIcon(select == 1);
}
/**
* 设置收藏图标
*/
public void collectIcon(boolean isCollect) {
if (collectIv != null) {
if (isCollect) {
collectIv.setSelectImageResId(ToolsUtil.getCollectStyle(1,true));
}else {
collectIv.setUnselectImageResId(ToolsUtil.getCollectStyle(1,false));
}
collectIv.setSelected(isCollect);
}
}
/**
* 设置点赞图标
*/
public void likeIcon(boolean isCollect) {
if (likeIv != null) {
int likeStyleNormalIcon = ToolsUtil.getLikeStyle(likesStyle,1,false);
int likeStyleSelIcon = ToolsUtil.getLikeStyle(likesStyle,1,true);
if (likesStyle == 4 ||likeStyleNormalIcon == 4 || likeStyleSelIcon==4){
closeLike();
return;
}
if (isCollect) {
likeIv.setSelectImageResId(likeStyleSelIcon);
}else {
likeIv.setUnselectImageResId(likeStyleNormalIcon);
}
likeIv.setSelected(isCollect);
}
}
public void setCommentFunctionListener(CommentFunctionListener commentFunctionListener) {
this.commentFunctionListener = commentFunctionListener;
}
public void closeLikes(boolean close) {
this.closeLikesIcon = close;
if(close){
likeIv.setVisibility(GONE);
}else{
likeIv.setVisibility(VISIBLE);
}
}
public interface CommentFunctionListener {
/**
* 返回
*/
void backClick();
/**
* 输入
*/
void inputClick();
/**
* 评论
*/
void commentClick();
/**
* 点赞
*
* @param status -1:只是点了按钮 0、1为点赞状态
*/
void likeClick(String status);
/**
* 收藏
*
* @param status -1:只是点了按钮 0、1为收藏状态
*/
void collectClick(String status);
/**
* 分享
*/
void shareClick();
void addCollectLabel(String label);
}
/**
* 传递内容id 、内容类型
*/
public void setContentAndType(TransparentBean bean) {
likesStyle = bean.getLikesStyle();
openLikes = bean.getOpenLikes();
contentId = bean.getContentId();
contentType = bean.getContentType();
contentRelId = bean.getContentRelId();
relType = bean.getRelType();
rmhPlatform = bean.getRmhPlatform();
title = bean.getContentTitle();
channelId = bean.getChannelId();
//用户没有登录
if (!PDUtils.isLogin()) {
//设置点赞样式
likeIcon(false);
return;
}
if (!StringUtils.isEmpty(contentId) && !StringUtils.isEmpty(contentType)) {
Message message = new Message();
message.what = 0;
mHandler.sendMessage(message);
}
}
/**
* 工作线程
*/
class WorkThreadHandler extends Handler {
public WorkThreadHandler(Looper looper) {
super(looper);
}
@Override
public void handleMessage(Message msg) {
try {
switch (msg.what) {
case 0://查询收藏、点赞
if (!StringUtils.isEmpty(SpUtils.getUserToken())) {
queryLikeAndCollectStatus();
}
break;
case 1://点赞
if (!StringUtils.isEmpty(SpUtils.getUserToken())) {
userClickLikeStatus();
}
break;
case 2://收藏
if (!StringUtils.isEmpty(SpUtils.getUserToken())) {
userClickCollectStatus();
}
break;
default:
break;
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* 查询当前内容、用户点赞、收藏状态
*/
public void queryLikeAndCollectStatus() {
if (StringUtils.isEmpty(contentId) || StringUtils.isEmpty(contentType)) {
return;
}
List<DisplayWorkInfoBean> workList = new ArrayList<>();
DisplayWorkInfoBean workInfoBean = new DisplayWorkInfoBean();
workInfoBean.setContentId(contentId);
workInfoBean.setContentSource(contentType);
workInfoBean.setContentRelId(contentRelId);
workInfoBean.setRelType(String.valueOf(relType));
workList.add(workInfoBean);
// showLoading();
QueryLikeStatusTools.getInstance().queryLikeStatus(workList, new QueryLikeStatusCallback() {
@Override
public void onSuccess(List<DisplayWorkInfoBean> dataBeans) {
// dismissLoading();
if (null != dataBeans && dataBeans.size() > 0) {
setLikeAndCollect(dataBeans.get(0));
}
}
@Override
public void onFailed(String msg) {
// dismissLoading();
}
});
}
/**
* 用户点赞
*/
private void userClickLikeStatus() {
if (StringUtils.isEmpty(contentId) || StringUtils.isEmpty(contentType)) {
return;
}
if ("0".equals(likeStatus)) {
likeStatus = "1";
} else {
likeStatus = "0";
}
if (commentFunctionListener != null) {
commentFunctionListener.likeClick(likeStatus);
}
// showLoading();
LikeTools.getInstance().userContentExecuteLike(contentId, contentType, contentRelId,
relType, likeStatus, title, channelId,
new LikeCallback() {
@Override
public void onSuccess(String msg, String oldLikeStatus, String newLikeStatus) {
// dismissLoading();
// String showTip = "";
if ("0".equals(likeStatus)) {
likeIcon(false);
// showTip = "取消点赞";
} else {
likeIcon(true);
// showTip = "已点赞";
}
// ToastNightUtil.showShort(showTip);
// queryContentNumber();
updateLikeNum(likeStatus);
}
@Override
public void onFailed(String msg) {
// dismissLoading();
}
});
}
/**
* 用户收藏
*/
private void userClickCollectStatus() {
if (StringUtils.isEmpty(contentId) || StringUtils.isEmpty(contentType)) {
return;
}
if ("0".equals(collectStatus)) {
collectStatus = "1";
} else {
collectStatus = "0";
}
if (commentFunctionListener != null) {
commentFunctionListener.collectClick(collectStatus);
}
// showLoading();
//添加、删除单个收藏
AddDelCollectBean bean = new AddDelCollectBean();
bean.setStatus(collectStatus);
List<AddDelCollectBean.ContentListBean> beanList = new ArrayList<>();
AddDelCollectBean.ContentListBean listBean = new AddDelCollectBean.ContentListBean();
listBean.setContentId(contentId);
listBean.setContentType(contentType);
listBean.setContentRelId(contentRelId);
listBean.setRelType(relType);
beanList.add(listBean);
bean.setContentList(beanList);
//收藏工具类
CollectTools.getInstance().addToDelCollect(getContext(), bean, new CollectCallback() {
@Override
public void onSuccess(String msg) {
// dismissLoading();
if ("0".equals(collectStatus)) {
collectIcon(false);
} else {
collectIcon(true);
}
//接口回调
if (commentFunctionListener != null) {
commentFunctionListener.collectClick(collectStatus);
}
}
@Override
public void onFailed(String msg) {
// dismissLoading();
}
}, new AddFavoriteLabelCallback() {
@Override
public void onAddFavoriteLabel(String favoriteCategoryLabel) {
if (commentFunctionListener != null) {
commentFunctionListener.addCollectLabel(favoriteCategoryLabel);
}
}
});
}
/**
* 移除线程操作
*/
public void cancelHandler() {
if (null != mHandler) {
mHandler.removeCallbacksAndMessages(null);
mHandler = null;
}
// dismissLoading();
}
/**
* 设置点赞、收藏图标状态
*/
private void setLikeAndCollect(DisplayWorkInfoBean infoBean) {
//点赞状态
if (!StringUtils.isEmpty(infoBean.getLikeStatus())) {
likeStatus = infoBean.getLikeStatus();
if ("0".equals(likeStatus)) {
likeIcon(false);
} else {
likeIcon(true);
}
}
//收藏状态
if (!StringUtils.isEmpty(infoBean.getCollectStatus())) {
collectStatus = infoBean.getCollectStatus();
if ("0".equals(collectStatus)) {
collectIcon(false);
} else {
collectIcon(true);
}
}
}
// /**
// * 显示loading框
// */
// public void showLoading() {
// ThreadPoolUtils.postToMain(() -> {
// if (null != mLoadingDialog) {
// mLoadingDialog.show();
// }
// });
// }
// /**
// * 隐藏loading框
// */
// public void dismissLoading() {
// ThreadPoolUtils.postToMain(() -> {
// if (null != mLoadingDialog) {
// mLoadingDialog.dismiss();
// }
// });
//
// }
/**
* 查询内容动态数据
*/
public void queryContentNumber(){
InteractFetcher interactFetcher = new InteractFetcher(new IInteractDataListener() {
@Override
public void onInteractDataSuccess(List<InteractResponseDataBean> dataList) {
InteractResponseDataBean interactResponseDataBean = ArrayUtils.getListElement(dataList, 0);
if (interactResponseDataBean == null) {
return;
}
likeNum = interactResponseDataBean.getLikeNum()+"";
if (!TextUtils.isEmpty(likeNum)) {
setLikeNum(likeNum);
}
String commentNum = interactResponseDataBean.getCommentNum();
if (!TextUtils.isEmpty(commentNum) ) {
setCommentNum(commentNum);
}
}
@Override
public void onInteractDataError(String errorMsg) {
}
});
if (contentType == null || TextUtils.isEmpty(contentType)){
ToastNightUtil.showShort("内容类型有问题请检查");
return;
}
int type = Integer.parseInt(contentType);
interactFetcher.oneInteractData(contentId,type,"1",rmhPlatform);
}
public void commentNumShow(boolean isShow){
if(mCloseComment){
commentNumLayout.setVisibility(GONE);
return;
}
if (commentNumTv != null && !TextUtils.isEmpty(commentNumTv.getText().toString()) ){
commentNumLayout.setVisibility(isShow ? VISIBLE: GONE);
}
}
public void likeNumShow(boolean isShow){
if(closeLikesIcon){
likeNumLayout.setVisibility(GONE);
return;
}
if (ciTvLikeNum != null && !TextUtils.isEmpty(ciTvLikeNum.getText().toString()) ){
likeNumLayout.setVisibility(isShow ? VISIBLE: GONE);
}
}
}