dxh 6 年之前
父节点
当前提交
9076b871df

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

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

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

25
import com.electric.chargingpile.data.TalkRecommendBean;
25
import com.electric.chargingpile.data.TalkRecommendBean;
26
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
26
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
27
import com.electric.chargingpile.util.JsonUtils;
27
import com.electric.chargingpile.util.JsonUtils;
28
import com.electric.chargingpile.util.NetUtil;
28
import com.electric.chargingpile.util.ToastUtil;
29
import com.electric.chargingpile.util.ToastUtil;
29
import com.zhy.http.okhttp.OkHttpUtils;
30
import com.zhy.http.okhttp.OkHttpUtils;
30
import com.zhy.http.okhttp.callback.StringCallback;
31
import com.zhy.http.okhttp.callback.StringCallback;
121
                int pos = position - 1;
122
                int pos = position - 1;
122
                ArrayList<TalkRecommendBean> talkRecommendBeans = layoutAdapter.getCurrentData();
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
                if(type == 2){
129
                if(type == 2){
125
                    startActivity(new Intent(getActivity(), PersonalPageActivity.class).putExtra("targetUserId", talkRecommendBeans.get(pos).addUserId+""));
130
                    startActivity(new Intent(getActivity(), PersonalPageActivity.class).putExtra("targetUserId", talkRecommendBeans.get(pos).addUserId+""));
126
                    return;
131
                    return;

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

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

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

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