dxh 6 years ago
parent
commit
9076b871df

+ 5 - 1
app/src/main/java/com/electric/chargingpile/adapter/VideoCommentAdapter.java

@ -68,7 +68,7 @@ public class VideoCommentAdapter extends RecyclerView.Adapter<VideoCommentAdapte
68 68
69 69
        viewHolder.mItemUserName.setText(videoCommentBean.nickNameFromUser);
70 70
71
        viewHolder.mItemUserTime.setText(videoCommentBean.addTime + "");
71
        viewHolder.mItemUserTime.setText(videoCommentBean.addDate + "");
72 72
        viewHolder.mItemUserCon.setText(videoCommentBean.content);
73 73
//
74 74
//        viewHolder.mItemUserOperation = (LinearLayout) itemView.findViewById(R.id.item_user_operation);
@ -106,6 +106,10 @@ public class VideoCommentAdapter extends RecyclerView.Adapter<VideoCommentAdapte
106 106
        notifyDataSetChanged();
107 107
    }
108 108
109
    public int getAllCount(){
110
        return dataList.size();
111
    }
112
109 113
    public void addData(List<VideoCommentBean> qadata) {
110 114
        if (qadata != null) {
111 115
            dataList.addAll(qadata);

+ 5 - 0
app/src/main/java/com/electric/chargingpile/fragment/TalkRecommendFragment.java

@ -25,6 +25,7 @@ import com.electric.chargingpile.data.Person;
25 25
import com.electric.chargingpile.data.TalkRecommendBean;
26 26
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
27 27
import com.electric.chargingpile.util.JsonUtils;
28
import com.electric.chargingpile.util.NetUtil;
28 29
import com.electric.chargingpile.util.ToastUtil;
29 30
import com.zhy.http.okhttp.OkHttpUtils;
30 31
import com.zhy.http.okhttp.callback.StringCallback;
@ -121,6 +122,10 @@ public class TalkRecommendFragment extends Fragment implements View.OnClickListe
121 122
                int pos = position - 1;
122 123
                ArrayList<TalkRecommendBean> talkRecommendBeans = layoutAdapter.getCurrentData();
123 124
125
                if (!NetUtil.CheckNetwork(getActivity())) {
126
                    Toast.makeText(getActivity(), "请检查网络", Toast.LENGTH_SHORT).show();
127
                    return;
128
                }
124 129
                if(type == 2){
125 130
                    startActivity(new Intent(getActivity(), PersonalPageActivity.class).putExtra("targetUserId", talkRecommendBeans.get(pos).addUserId+""));
126 131
                    return;

+ 4 - 0
app/src/main/java/com/electric/chargingpile/view/VideoCommentDialog.java

@ -125,6 +125,9 @@ public class VideoCommentDialog extends Dialog implements View.OnClickListener {
125 125
                                    videoCommentAdapter.addData(qadata);
126 126
                                }
127 127
                            }
128
129
                            if(videoCommentAdapter.getAllCount()>0)
130
                                showCommentTitle.setText("全部评论 " + videoCommentAdapter.getAllCount());
128 131
                        }
129 132
                        show_comment_progress_ll.setVisibility(View.GONE);
130 133
                    }
@ -163,6 +166,7 @@ public class VideoCommentDialog extends Dialog implements View.OnClickListener {
163 166
            public void afterTextChanged(Editable editable) {
164 167
                int i2 = editable.length();
165 168
                if(i2>200){
169
                    Toast.makeText(context, "评论最多200字,请删减后再发布", Toast.LENGTH_SHORT).show();
166 170
                    showCommentEd.setTextColor(Color.parseColor("#E90A0A"));
167 171
                }else {
168 172
                    showCommentEd.setTextColor(Color.parseColor("#ffffff"));

+ 6 - 2
app/src/main/res/layout/app_talk_item_recylerview.xml

@ -58,7 +58,7 @@
58 58
        android:paddingLeft="10dp"
59 59
        android:paddingRight="10dp"
60 60
        android:ellipsize="end"
61
        android:maxLines="2"
61
        android:maxLines="3"
62 62
        android:text="123"
63 63
        android:textColor="@color/color_222222"
64 64
        android:textSize="15sp" />
@ -83,6 +83,7 @@
83 83
            android:textSize="13sp" />
84 84
85 85
        <ImageView
86
            android:id="@+id/recycler_view_zan_icon"
86 87
            android:layout_width="15dp"
87 88
            android:layout_height="13dp"
88 89
            android:layout_centerVertical="true"
@ -98,9 +99,12 @@
98 99
99 100
        <TextView
100 101
            android:id="@+id/user_avater_name"
101
            android:layout_width="wrap_content"
102
            android:layout_width="match_parent"
102 103
            android:layout_height="wrap_content"
103 104
            android:layout_centerVertical="true"
105
            android:singleLine="true"
106
            android:ellipsize="end"
107
            android:layout_toLeftOf="@+id/recycler_view_zan_icon"
104 108
            android:layout_toRightOf="@+id/user_avater"
105 109
            android:paddingLeft="5dp"
106 110
            android:text="456"