Browse Source

完成站点评论详情页展示,移除聊聊推荐界面

hy 2 years ago
parent
commit
37a99ea468

+ 8 - 8
app/src/main/java/com/electric/chargingpile/activity/ChatActivity.java

37
    private ViewPager chat_view_pager;
37
    private ViewPager chat_view_pager;
38
    public static boolean isRefresh = false;
38
    public static boolean isRefresh = false;
39
    private ViewPagerFragmentAdapter viewPagerFragmentAdapter;
39
    private ViewPagerFragmentAdapter viewPagerFragmentAdapter;
40
    private ChatRecommendFragment chatRecommendFragment;
40
   // private ChatRecommendFragment chatRecommendFragment;
41
    private QaActivityFragment qaActivityFragment;
41
    private QaActivityFragment qaActivityFragment;
42
    private TextView act_bar_title_recommend;
42
    private TextView act_bar_title_recommend;
43
    private TextView act_bar_title_help;
43
    private TextView act_bar_title_help;
76
        act_bar_help_search = findViewById(R.id.act_bar_help_search);
76
        act_bar_help_search = findViewById(R.id.act_bar_help_search);
77
77
78
        viewPagerFragmentAdapter = new ViewPagerFragmentAdapter(getSupportFragmentManager());
78
        viewPagerFragmentAdapter = new ViewPagerFragmentAdapter(getSupportFragmentManager());
79
        chatRecommendFragment = new ChatRecommendFragment();
79
//        chatRecommendFragment = new ChatRecommendFragment();
80
        qaActivityFragment = new QaActivityFragment();
80
        qaActivityFragment = new QaActivityFragment();
81
        viewPagerFragmentAdapter.addFragment(chatRecommendFragment);
81
       // viewPagerFragmentAdapter.addFragment(chatRecommendFragment);
82
        viewPagerFragmentAdapter.addFragment(qaActivityFragment);
82
        viewPagerFragmentAdapter.addFragment(qaActivityFragment);
83
        chat_view_pager.setOffscreenPageLimit(2);
83
        chat_view_pager.setOffscreenPageLimit(2);
84
        chat_view_pager.setCurrentItem(0);
84
        chat_view_pager.setCurrentItem(0);
174
                overridePendingTransition(0, 0);
174
                overridePendingTransition(0, 0);
175
                break;
175
                break;
176
            case R.id.tab_qa:
176
            case R.id.tab_qa:
177
                chatRecommendFragment.refresh();
177
                //chatRecommendFragment.refresh();
178
                MobclickAgent.onEvent(getApplicationContext(), "0999");
178
                MobclickAgent.onEvent(getApplicationContext(), "0999");
179
                break;
179
                break;
180
            case R.id.tab_screening: // 充电
180
            case R.id.tab_screening: // 充电
318
        }
318
        }
319
    }
319
    }
320
320
321
    @Override
322
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
323
        chatRecommendFragment.onActivityResult(requestCode, requestCode, data);
324
    }
321
//    @Override
322
//    public void onActivityResult(int requestCode, int resultCode, Intent data) {
323
//        chatRecommendFragment.onActivityResult(requestCode, requestCode, data);
324
//    }
325
325
326
}
326
}

+ 3 - 1
app/src/main/java/com/electric/chargingpile/activity/ImagePagerActivity.java

14
14
15
import com.electric.chargingpile.R;
15
import com.electric.chargingpile.R;
16
import com.electric.chargingpile.view.HackyViewPager;
16
import com.electric.chargingpile.view.HackyViewPager;
17
17
/**
18
 * 网络图片展示
19
 * */
18
public class ImagePagerActivity extends FragmentActivity {
20
public class ImagePagerActivity extends FragmentActivity {
19
    private static final String STATE_POSITION = "STATE_POSITION";
21
    private static final String STATE_POSITION = "STATE_POSITION";
20
    public static final String EXTRA_IMAGE_INDEX = "image_index";
22
    public static final String EXTRA_IMAGE_INDEX = "image_index";

+ 7 - 0
app/src/main/java/com/electric/chargingpile/activity/SelectTopicActivity.java

75
    }
75
    }
76
76
77
    public void requestTopicList(){
77
    public void requestTopicList(){
78
        dialog.show();
78
        String url = MainApplication.url + "/zhannew/basic/web/index.php/theme/getlist";
79
        String url = MainApplication.url + "/zhannew/basic/web/index.php/theme/getlist";
79
       // Log.e("HYC", "onResponse: "+url );
80
       // Log.e("HYC", "onResponse: "+url );
80
        OkHttpUtils.get().url(url).build().connTimeOut(5000).readTimeOut(5000).execute(new StringCallback() {
81
        OkHttpUtils.get().url(url).build().connTimeOut(5000).readTimeOut(5000).execute(new StringCallback() {
81
82
82
            @Override
83
            @Override
83
            public void onError(Call call, Exception e) {
84
            public void onError(Call call, Exception e) {
85
                if (dialog.isShowing()){
86
                    dialog.dismiss();
87
                }
84
                Toast.makeText(getApplicationContext(), "网络不给力,请检查网络状态", Toast.LENGTH_SHORT).show();
88
                Toast.makeText(getApplicationContext(), "网络不给力,请检查网络状态", Toast.LENGTH_SHORT).show();
85
            }
89
            }
86
90
87
            @Override
91
            @Override
88
            public void onResponse(String response) {
92
            public void onResponse(String response) {
93
                if (dialog.isShowing()){
94
                    dialog.dismiss();
95
                }
89
                if (null != response) {
96
                if (null != response) {
90
                    String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
97
                    String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
91
                    if (EmptyUtils.isNotEmpty(rtnCode)&& rtnCode .equals("01")) {
98
                    if (EmptyUtils.isNotEmpty(rtnCode)&& rtnCode .equals("01")) {

+ 22 - 15
app/src/main/java/com/electric/chargingpile/activity/ZhanCommentActivity.java

44
import com.electric.chargingpile.data.MyOtto;
44
import com.electric.chargingpile.data.MyOtto;
45
import com.electric.chargingpile.data.RObject;
45
import com.electric.chargingpile.data.RObject;
46
import com.electric.chargingpile.data.TopicBean;
46
import com.electric.chargingpile.data.TopicBean;
47
import com.electric.chargingpile.data.VideoUploadResult;
47
import com.electric.chargingpile.engine.GlideEngine;
48
import com.electric.chargingpile.engine.GlideEngine;
48
import com.electric.chargingpile.util.BarColorUtil;
49
import com.electric.chargingpile.util.BarColorUtil;
49
import com.electric.chargingpile.util.Bimp;
50
import com.electric.chargingpile.util.Bimp;
72
import com.luck.picture.lib.config.PictureConfig;
73
import com.luck.picture.lib.config.PictureConfig;
73
import com.luck.picture.lib.config.PictureMimeType;
74
import com.luck.picture.lib.config.PictureMimeType;
74
import com.luck.picture.lib.entity.LocalMedia;
75
import com.luck.picture.lib.entity.LocalMedia;
76
import com.umeng.analytics.MobclickAgent;
75
import com.upyun.library.common.SerialUploader;
77
import com.upyun.library.common.SerialUploader;
78
import com.upyun.library.common.UploadEngine;
76
import com.upyun.library.listener.UpCompleteListener;
79
import com.upyun.library.listener.UpCompleteListener;
80
import com.upyun.library.listener.UpProgressListener;
77
import com.zhy.http.okhttp.OkHttpUtils;
81
import com.zhy.http.okhttp.OkHttpUtils;
78
import com.zhy.http.okhttp.callback.StringCallback;
82
import com.zhy.http.okhttp.callback.StringCallback;
79
import com.zhy.view.flowlayout.FlowLayout;
83
import com.zhy.view.flowlayout.FlowLayout;
161
                         }
165
                         }
162
                    break;
166
                    break;
163
                case IMG_ERROR:
167
                case IMG_ERROR:
164
                    ToastUtil.showToast(getApplicationContext(), "文件上传失败", Toast.LENGTH_SHORT);
168
                    ToastUtil.showToast(getApplicationContext(), "图片上传失败", Toast.LENGTH_SHORT);
165
                    break;
169
                    break;
166
                case StatusConstants.REQUEST_WHAT_SUCCESS:
170
                case StatusConstants.REQUEST_WHAT_SUCCESS:
167
171
174
178
175
179
176
    private int mInsterType = -1; //1 插入图片 2 插入视频 -1 未插入数据
180
    private int mInsterType = -1; //1 插入图片 2 插入视频 -1 未插入数据
177
    private AuthSignBean signBeans;
178
    private SerialUploader serialUploader;
181
182
183
    private TopicBean mTopicbean;
179
184
180
    @Override
185
    @Override
181
    protected void onCreate(Bundle savedInstanceState) {
186
    protected void onCreate(Bundle savedInstanceState) {
488
                String u = UploadUtil.post(MainApplication.url + "/zhannew/basic/web/index.php/fileupload/upload",
493
                String u = UploadUtil.post(MainApplication.url + "/zhannew/basic/web/index.php/fileupload/upload",
489
                        par, null);
494
                        par, null);
490
                JSONObject jsonObject = new JSONObject(u);
495
                JSONObject jsonObject = new JSONObject(u);
491
                Log.e("hyc==", u);
496
492
                String code = jsonObject.getString("code");
497
                String code = jsonObject.getString("code");
493
                if (code.equals("200")) {
498
                if (code.equals("200")) {
494
                    Log.e("200==", "图片成功");
495
                    String fileUrl = jsonObject.getString("fileUrl");
499
                    String fileUrl = jsonObject.getString("fileUrl");
496
                    fileList.add(fileUrl);
500
                    fileList.add(fileUrl);
497
                }else{
501
                }else{
498
499
                    Message msg = new Message();
502
                    Message msg = new Message();
500
                    msg.what = IMG_ERROR;
503
                    msg.what = IMG_ERROR;
501
                    handler.sendMessage(msg);
504
                    handler.sendMessage(msg);
544
            }
547
            }
545
        } else if (requestCode == REQUEST_TOPIC_CODE && resultCode == SelectTopicActivity.REESULT_CODE) {
548
        } else if (requestCode == REQUEST_TOPIC_CODE && resultCode == SelectTopicActivity.REESULT_CODE) {
546
            String name = data.getStringExtra("topicBean");
549
            String name = data.getStringExtra("topicBean");
547
            TopicBean bean = mGson.fromJson(name, TopicBean.class);
548
            topicText.setText(bean.getMeg());
550
            mTopicbean = mGson.fromJson(name, TopicBean.class);
551
            topicText.setText(mTopicbean.getMeg());
549
        }
552
        }
550
553
551
    }
554
    }
655
        map.put("comment",URLEncoder.encode(et_pinglun.getText().toString()));
658
        map.put("comment",URLEncoder.encode(et_pinglun.getText().toString()));
656
        map.put("tel",MainApplication.userPhone);
659
        map.put("tel",MainApplication.userPhone);
657
        map.put("token",URLEncoder.encode(DES3.encode(token)));
660
        map.put("token",URLEncoder.encode(DES3.encode(token)));
658
        if (topicText!=null){
659
            map.put("theme",topicText.getText().toString());
661
        if (mTopicbean!=null){
662
            map.put("theme",mTopicbean.getMeg());
660
        }
663
        }
661
664
665
662
        if (commentType == 1){
666
        if (commentType == 1){
663
            if (fileUrlList.size()>0){
667
            if (fileUrlList.size()>0){
664
                for (int i = 0; i < fileUrlList.size(); i++) {
668
                for (int i = 0; i < fileUrlList.size(); i++) {
669
                        map.put("file"+(i+1)+"Url", value);
673
                        map.put("file"+(i+1)+"Url", value);
670
                    }
674
                    }
671
                }
675
                }
672
                map.put("thumUrl",fileUrlList.get(0));
676
                if (mInsterType == 1 && mInsterType == -1){
677
                    map.put("type", ChatRecommendBean.TARGET_TYPE_IMAGE_TEXT + "");
678
                    map.put("thumUrl",fileUrlList.get(0));
679
                }else if (mInsterType == 2) {
680
                    map.put("type", ChatRecommendBean.TARGET_TYPE_VIDEO + "");
681
                }
673
            }
682
            }
674
683
675
        }else  if (commentType == 2) {
684
        }else  if (commentType == 2) {
890
                        String desc = JsonUtils.getKeyResult(response, "desc");
899
                        String desc = JsonUtils.getKeyResult(response, "desc");
891
                        if ("1000".equals(code)) {
900
                        if ("1000".equals(code)) {
892
                            String data = JsonUtils.getKeyResult(response, "data");
901
                            String data = JsonUtils.getKeyResult(response, "data");
893
                            signBeans = (AuthSignBean) JsonUtils.parseToObjectBean(data, AuthSignBean.class);
902
                            AuthSignBean signBeans = (AuthSignBean) JsonUtils.parseToObjectBean(data, AuthSignBean.class);
894
                            if (null != signBeans) {
903
                            if (null != signBeans) {
895
                                String sign = signBeans.sign;
904
                                String sign = signBeans.sign;
896
                                String policy = signBeans.policy;
905
                                String policy = signBeans.policy;
916
     */
925
     */
917
    private void formUpload(String SAMPLE_PIC_FILE, String sign, String policyServer, String fileName) {
926
    private void formUpload(String SAMPLE_PIC_FILE, String sign, String policyServer, String fileName) {
918
927
919
        if (serialUploader == null) {
920
            serialUploader = new SerialUploader();
921
        }
928
        SerialUploader  serialUploader = new SerialUploader();
922
929
923
        serialUploader.setCheckMD5(false);
930
        serialUploader.setCheckMD5(false);
924
931

+ 107 - 17
app/src/main/java/com/electric/chargingpile/adapter/NewPingLunAdapter.java

7
import android.os.Build;
7
import android.os.Build;
8
import android.text.SpannableString;
8
import android.text.SpannableString;
9
import android.text.Spanned;
9
import android.text.Spanned;
10
import android.text.TextUtils;
10
import android.text.style.ForegroundColorSpan;
11
import android.text.style.ForegroundColorSpan;
11
import android.util.Log;
12
import android.util.Log;
12
import android.view.LayoutInflater;
13
import android.view.LayoutInflater;
22
import android.widget.TextView;
23
import android.widget.TextView;
23
import android.widget.Toast;
24
import android.widget.Toast;
24
25
26
import com.bumptech.glide.Glide;
25
import com.electric.chargingpile.R;
27
import com.electric.chargingpile.R;
26
import com.electric.chargingpile.activity.ImagePagerActivity;
28
import com.electric.chargingpile.activity.ImagePagerActivity;
27
import com.electric.chargingpile.activity.NewZhanDetailsActivity;
29
import com.electric.chargingpile.activity.NewZhanDetailsActivity;
135
            holder.rl_grade = (RelativeLayout) convertView.findViewById(R.id.rl_grade);
137
            holder.rl_grade = (RelativeLayout) convertView.findViewById(R.id.rl_grade);
136
            holder.iv_grade = (ImageView) convertView.findViewById(R.id.iv_grade);
138
            holder.iv_grade = (ImageView) convertView.findViewById(R.id.iv_grade);
137
            holder.iv_commentPic = (ImageView) convertView.findViewById(R.id.iv_commentPic);
139
            holder.iv_commentPic = (ImageView) convertView.findViewById(R.id.iv_commentPic);
140
            holder.imgTwo = (ImageView) convertView.findViewById(R.id.imgTwo);
141
            holder.imgThree = (ImageView) convertView.findViewById(R.id.imgThree);
142
            holder.imgStart = (ImageView) convertView.findViewById(R.id.imgStart);
143
            holder.imgVideo = (ImageView) convertView.findViewById(R.id.imgVideo);
144
            holder.imgLayout = (RelativeLayout) convertView.findViewById(R.id.imgLayout);
138
            holder.tv_grade = (TextView) convertView.findViewById(R.id.tv_grade);
145
            holder.tv_grade = (TextView) convertView.findViewById(R.id.tv_grade);
139
            holder.mFlowLayout = (TagFlowLayout) convertView.findViewById(R.id.id_flowlayout_activity);
146
            holder.mFlowLayout = (TagFlowLayout) convertView.findViewById(R.id.id_flowlayout_activity);
140
147
148
        {
155
        {
149
            try {
156
            try {
150
//                "fileUrl":"","thumUrl":""
157
//                "fileUrl":"","thumUrl":""
151
                String thumUrl = datas.get(position).getString("thumUrl");
158
                //父级评论图片
152
                String fileUrl = datas.get(position).getString("fileUrl");
159
                String fileUrl = datas.get(position).getString("fileUrl");
153
                if (!thumUrl.equals("")) {
154
                    holder.iv_commentPic.setVisibility(View.VISIBLE);
155
                    final String url = MainApplication.url + "/zhannew/uploadfile/" + thumUrl;
156
                    final String file_url = MainApplication.url + "/zhannew/uploadfile/" + fileUrl;
157
                    final String[] s = {file_url};
158
                    Picasso.with(MainApplication.context)
159
                            .load(MainApplication.url + "/zhannew/uploadfile/" + thumUrl)
160
                            .placeholder(R.drawable.icon_user1118)
161
                            .error(R.drawable.icon_user1118)
162
                            .into(holder.iv_commentPic);
163
//                    PicassoUtil.loadingNetImage(convertView.getContext(),url,holder.iv_commentPic);
160
                String file2Url = datas.get(position).getString("file2Url");
161
                String file3Url = datas.get(position).getString("file3Url");
162
                String type = datas.get(position).getString("type"); //23 视频,24 图片
163
                if (type.equals("23")){
164
                    String thumUrl = datas.get(position).getString("thumUrl");
165
                    if (!TextUtils.isEmpty(thumUrl)){
166
                        holder.imgVideo.setVisibility(View.VISIBLE);
167
                        holder.imgStart.setVisibility(View.VISIBLE);
168
169
                        holder.iv_commentPic.setVisibility(View.GONE);
170
                        holder.imgTwo.setVisibility(View.GONE);
171
                        holder.imgThree.setVisibility(View.GONE);
172
173
                        Glide.with(MainApplication.context)
174
                                .load(MainApplication.CDN +fileUrl)
175
                                .into(holder.imgVideo);
176
177
                        holder.imgVideo.setOnClickListener(v->{
178
179
                        });
180
                    }
181
                }else {
182
183
                    holder.imgVideo.setVisibility(View.GONE);
184
                    holder.imgStart.setVisibility(View.GONE);
185
186
187
                    if (!fileUrl.equals("")) {
188
                        holder.iv_commentPic.setVisibility(View.VISIBLE);
189
                        holder.imgLayout.setVisibility(View.VISIBLE);
190
191
                        Picasso.with(MainApplication.context)
192
                                .load(MainApplication.url + "/zhannew/uploadfile/"+fileUrl)
193
                                .into(holder.iv_commentPic);
194
195
                    } else {
196
                        holder.iv_commentPic.setVisibility(View.GONE);
197
                        holder.imgLayout.setVisibility(View.GONE);
198
                    }
199
                    if (!file2Url.equals("")) {
200
                        holder.imgTwo.setVisibility(View.VISIBLE);
201
                        Picasso.with(MainApplication.context)
202
                                .load(MainApplication.url + "/zhannew/uploadfile/"+file2Url)
203
                                .into(holder.imgTwo);
204
                    } else {
205
                        holder.imgTwo.setVisibility(View.GONE);
206
                    }
207
                    if (!file3Url.equals("")) {
208
                        holder.imgThree.setVisibility(View.VISIBLE);
209
                        Picasso.with(MainApplication.context)
210
                                .load(MainApplication.url + "/zhannew/uploadfile/"+file3Url)
211
                                .into(holder.imgThree);
212
                    } else {
213
                        holder.imgThree.setVisibility(View.GONE);
214
                    }
215
216
217
                    String[] fileUrlArray = null;
218
                    if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url) &&!TextUtils.isEmpty(file3Url)){
219
                        fileUrlArray =new String[]{
220
                                MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
221
                                MainApplication.url + "/zhannew/uploadfile/"+file2Url,
222
                                MainApplication.url + "/zhannew/uploadfile/"+file3Url
223
                        };
224
                    }else  if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url)){
225
                        fileUrlArray =new String[]{
226
                                MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
227
                                MainApplication.url + "/zhannew/uploadfile/"+file2Url
228
                        };
229
                    }else  if (!TextUtils.isEmpty(fileUrl)){
230
                        fileUrlArray =new String[]{ MainApplication.url + "/zhannew/uploadfile/"+fileUrl};
231
                    }
232
164
                    final View finalConvertView2 = convertView;
233
                    final View finalConvertView2 = convertView;
234
                    String[] finalFileUrlArray = fileUrlArray;
165
                    holder.iv_commentPic.setOnClickListener(new View.OnClickListener() {
235
                    holder.iv_commentPic.setOnClickListener(new View.OnClickListener() {
166
                        @Override
236
                        @Override
167
                        public void onClick(View v) {
237
                        public void onClick(View v) {
168
                            Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
238
                            Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
169
                            // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
239
                            // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
170
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, s);
240
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
171
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
241
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
172
                            finalConvertView2.getContext().startActivity(intent);
242
                            finalConvertView2.getContext().startActivity(intent);
173
                        }
243
                        }
174
                    });
244
                    });
175
                } else {
176
                    holder.iv_commentPic.setVisibility(View.GONE);
245
                    holder.imgTwo.setOnClickListener(new View.OnClickListener() {
246
                        @Override
247
                        public void onClick(View v) {
248
                            Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
249
                            // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
250
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
251
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 1);
252
                            finalConvertView2.getContext().startActivity(intent);
253
                        }
254
                    });
255
                    holder.imgThree.setOnClickListener(new View.OnClickListener() {
256
                        @Override
257
                        public void onClick(View v) {
258
                            Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
259
                            // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
260
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
261
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 2);
262
                            finalConvertView2.getContext().startActivity(intent);
263
                        }
264
                    });
177
                }
265
                }
178
266
267
179
                String title = datas.get(position).getString("title");
268
                String title = datas.get(position).getString("title");
180
                if (title != null) {
269
                if (title != null) {
181
                    if (title.equals("")) {
270
                    if (title.equals("")) {
453
                holder.tv_time.setText(TimeStamp2Date(datas.get(position).getString("addtime"), "yyyy-MM-dd"));
542
                holder.tv_time.setText(TimeStamp2Date(datas.get(position).getString("addtime"), "yyyy-MM-dd"));
454
                holder.tv_address.setText(datas.get(position).getString(
543
                holder.tv_address.setText(datas.get(position).getString(
455
                        "zhanname"));
544
                        "zhanname"));
545
                //地点
456
                holder.tv_address.setOnClickListener(new View.OnClickListener() {
546
                holder.tv_address.setOnClickListener(new View.OnClickListener() {
457
                    @Override
547
                    @Override
458
                    public void onClick(View v) {
548
                    public void onClick(View v) {
484
        CircleImageView iv_icon;
574
        CircleImageView iv_icon;
485
        ListView list_son;
575
        ListView list_son;
486
        LinearLayout ll_pinglun;
576
        LinearLayout ll_pinglun;
487
        ImageView iv_havemessage, iv_grade, iv_commentPic, iv_level_img;
577
        ImageView iv_havemessage, iv_grade, iv_commentPic, iv_level_img,imgTwo,imgThree,imgStart,imgVideo;
488
        ListView web_content;
578
        ListView web_content;
489
        RelativeLayout rl_grade;
579
        RelativeLayout rl_grade,imgLayout;
490
        TagFlowLayout mFlowLayout;
580
        TagFlowLayout mFlowLayout;
491
581
492
        int open;
582
        int open;

+ 126 - 14
app/src/main/java/com/electric/chargingpile/adapter/ZhanCommentsAapter.java

5
import android.content.Intent;
5
import android.content.Intent;
6
import android.text.SpannableString;
6
import android.text.SpannableString;
7
import android.text.Spanned;
7
import android.text.Spanned;
8
import android.text.TextUtils;
8
import android.text.style.ForegroundColorSpan;
9
import android.text.style.ForegroundColorSpan;
9
import android.util.Log;
10
import android.util.Log;
10
import android.view.LayoutInflater;
11
import android.view.LayoutInflater;
19
import android.widget.TextView;
20
import android.widget.TextView;
20
import android.widget.Toast;
21
import android.widget.Toast;
21
22
23
import com.bumptech.glide.Glide;
22
import com.electric.chargingpile.R;
24
import com.electric.chargingpile.R;
23
import com.electric.chargingpile.activity.ImagePagerActivity;
25
import com.electric.chargingpile.activity.ImagePagerActivity;
24
import com.electric.chargingpile.activity.LoginActivity;
26
import com.electric.chargingpile.activity.LoginActivity;
57
59
58
/**
60
/**
59
 * Created by demon on 2017/3/4.
61
 * Created by demon on 2017/3/4.
62
 *
63
 * 站点评论Adapter
60
 */
64
 */
61
65
62
public class ZhanCommentsAapter extends BaseAdapter {
66
public class ZhanCommentsAapter extends BaseAdapter {
133
            holder.high_grade_comment_icon = (ImageView) convertView.findViewById(R.id.high_grade_comment_icon);
137
            holder.high_grade_comment_icon = (ImageView) convertView.findViewById(R.id.high_grade_comment_icon);
134
            holder.iv_pgrade = (ImageView) convertView.findViewById(R.id.iv_pgrade);
138
            holder.iv_pgrade = (ImageView) convertView.findViewById(R.id.iv_pgrade);
135
            holder.iv_commentPic = (ImageView) convertView.findViewById(R.id.iv_commentPic);
139
            holder.iv_commentPic = (ImageView) convertView.findViewById(R.id.iv_commentPic);
140
            holder.imgTwo = (ImageView) convertView.findViewById(R.id.imgTwo);
141
            holder.imgThree = (ImageView) convertView.findViewById(R.id.imgThree);
142
            holder.imgStart = (ImageView) convertView.findViewById(R.id.imgStart);
143
            holder.imgVideo = (ImageView) convertView.findViewById(R.id.imgVideo);
136
            holder.iv_level_img = (ImageView) convertView.findViewById(R.id.iv_level_img);
144
            holder.iv_level_img = (ImageView) convertView.findViewById(R.id.iv_level_img);
137
            holder.iv_pzan = (ImageView) convertView.findViewById(R.id.iv_pzan);
145
            holder.iv_pzan = (ImageView) convertView.findViewById(R.id.iv_pzan);
138
            holder.ll_pzan = (LinearLayout) convertView.findViewById(R.id.ll_pzan);
146
            holder.ll_pzan = (LinearLayout) convertView.findViewById(R.id.ll_pzan);
139
            holder.fl_ptag = (TagFlowLayout) convertView.findViewById(R.id.fl_ptag);
147
            holder.fl_ptag = (TagFlowLayout) convertView.findViewById(R.id.fl_ptag);
140
            holder.parent = (RelativeLayout) convertView.findViewById(R.id.parent);
148
            holder.parent = (RelativeLayout) convertView.findViewById(R.id.parent);
149
            holder.imgLayout = (RelativeLayout) convertView.findViewById(R.id.imgLayout);
141
150
142
        }
151
        }
143
152
183
                }
192
                }
184
                //父级评论内容
193
                //父级评论内容
185
                String content = datas.get(position).getString("content");
194
                String content = datas.get(position).getString("content");
195
                String  theme= datas.get(position).optString("theme","");
196
                if (!TextUtils.isEmpty(theme.trim())){
197
                    content= "#"+theme+"#"+content;
198
                }
186
                if (content.equals("") || content.equals(" ")) {
199
                if (content.equals("") || content.equals(" ")) {
187
                    holder.tv_pcontext.setVisibility(View.GONE);
200
                    holder.tv_pcontext.setVisibility(View.GONE);
188
                } else {
201
                } else {
193
                    while (matcher.find()) {
206
                    while (matcher.find()) {
194
                        int start = matcher.start();
207
                        int start = matcher.start();
195
                        int end = matcher.end();
208
                        int end = matcher.end();
196
                        ss.setSpan(new ForegroundColorSpan(convertView.getResources().getColor(R.color.topic_blue)), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
209
                        ss.setSpan(new ForegroundColorSpan(convertView.getResources().getColor(R.color.topic_green)), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
197
210
198
                    }
211
                    }
199
                    holder.tv_pcontext.setText(ss);
212
                    holder.tv_pcontext.setText(ss);
419
                    }
432
                    }
420
                });
433
                });
421
                //父级评论图片
434
                //父级评论图片
422
                if (!datas.get(position).getString("thumUrl").equals("")) {
423
                    holder.iv_commentPic.setVisibility(View.VISIBLE);
424
                    final String url = MainApplication.url + "/zhannew/uploadfile/" + datas.get(position).getString("thumUrl");
425
                    final String file_url = MainApplication.url + "/zhannew/uploadfile/" + datas.get(position).getString("fileUrl");
426
                    final String[] s = {file_url};
427
                    Picasso.with(MainApplication.context)
428
                            .load(url)
429
                            .into(holder.iv_commentPic);
435
                String fileUrl = datas.get(position).getString("fileUrl");
436
                String file2Url = datas.get(position).getString("file2Url");
437
                String file3Url = datas.get(position).getString("file3Url");
438
                String type = datas.get(position).getString("type"); //23 视频,24 图片
439
                if (type.equals("23")){
440
441
                    String thumUrl = datas.get(position).getString("thumUrl");
442
                    if (!TextUtils.isEmpty(thumUrl)){
443
                        holder.imgVideo.setVisibility(View.VISIBLE);
444
                        holder.imgStart.setVisibility(View.VISIBLE);
445
446
                        holder.iv_commentPic.setVisibility(View.GONE);
447
                        holder.imgTwo.setVisibility(View.GONE);
448
                        holder.imgThree.setVisibility(View.GONE);
449
450
                        Glide.with(MainApplication.context)
451
                                .load(MainApplication.CDN +thumUrl)
452
                                .into(holder.imgVideo);
453
454
                        holder.imgVideo.setOnClickListener(v->{
455
                            try {
456
                                if (!datas.get(position).getString("id").equals("") && null != datas.get(position).getString("id")) {
457
                                    Intent intent = new Intent(finalConvertView1.getContext(), SingleCommentActivity.class);
458
                                    intent.putExtra("id", datas.get(position).getString("id"));
459
                                    finalConvertView1.getContext().startActivity(intent);
460
                                }
461
                            } catch (JSONException e) {
462
                                e.printStackTrace();
463
                            }
464
465
                        });
466
                    }
467
468
                }else {
469
470
                    holder.imgVideo.setVisibility(View.GONE);
471
                    holder.imgStart.setVisibility(View.GONE);
472
473
474
                    if (!fileUrl.equals("")) {
475
                        holder.iv_commentPic.setVisibility(View.VISIBLE);
476
                        holder.imgLayout.setVisibility(View.VISIBLE);
477
478
                        Picasso.with(MainApplication.context)
479
                                .load(MainApplication.url + "/zhannew/uploadfile/"+fileUrl)
480
                                .into(holder.iv_commentPic);
481
482
                    } else {
483
                        holder.iv_commentPic.setVisibility(View.GONE);
484
                        holder.imgLayout.setVisibility(View.GONE);
485
                    }
486
                    if (!file2Url.equals("")) {
487
                        holder.imgTwo.setVisibility(View.VISIBLE);
488
                        Picasso.with(MainApplication.context)
489
                                .load(MainApplication.url + "/zhannew/uploadfile/"+file2Url)
490
                                .into(holder.imgTwo);
491
                    } else {
492
                        holder.imgTwo.setVisibility(View.GONE);
493
                    }
494
                    if (!file3Url.equals("")) {
495
                        holder.imgThree.setVisibility(View.VISIBLE);
496
                        Picasso.with(MainApplication.context)
497
                                .load(MainApplication.url + "/zhannew/uploadfile/"+file3Url)
498
                                .into(holder.imgThree);
499
                    } else {
500
                        holder.imgThree.setVisibility(View.GONE);
501
                    }
502
503
504
                    String[] fileUrlArray = null;
505
                    if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url) &&!TextUtils.isEmpty(file3Url)){
506
                        fileUrlArray =new String[]{
507
                                MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
508
                                MainApplication.url + "/zhannew/uploadfile/"+file2Url,
509
                                MainApplication.url + "/zhannew/uploadfile/"+file3Url
510
                        };
511
                    }else  if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url)){
512
                        fileUrlArray =new String[]{
513
                                MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
514
                                MainApplication.url + "/zhannew/uploadfile/"+file2Url
515
                        };
516
                    }else  if (!TextUtils.isEmpty(fileUrl)){
517
                        fileUrlArray =new String[]{ MainApplication.url + "/zhannew/uploadfile/"+fileUrl};
518
                    }
519
430
                    final View finalConvertView2 = convertView;
520
                    final View finalConvertView2 = convertView;
521
                    String[] finalFileUrlArray = fileUrlArray;
431
                    holder.iv_commentPic.setOnClickListener(new View.OnClickListener() {
522
                    holder.iv_commentPic.setOnClickListener(new View.OnClickListener() {
432
                        @Override
523
                        @Override
433
                        public void onClick(View v) {
524
                        public void onClick(View v) {
434
                            Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
525
                            Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
435
                            // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
526
                            // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
436
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, s);
527
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
437
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
528
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
438
                            finalConvertView2.getContext().startActivity(intent);
529
                            finalConvertView2.getContext().startActivity(intent);
439
                        }
530
                        }
440
                    });
531
                    });
441
                } else {
442
                    holder.iv_commentPic.setVisibility(View.GONE);
532
                    holder.imgTwo.setOnClickListener(new View.OnClickListener() {
533
                        @Override
534
                        public void onClick(View v) {
535
                            Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
536
                            // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
537
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
538
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 1);
539
                            finalConvertView2.getContext().startActivity(intent);
540
                        }
541
                    });
542
                    holder.imgThree.setOnClickListener(new View.OnClickListener() {
543
                        @Override
544
                        public void onClick(View v) {
545
                            Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
546
                            // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
547
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
548
                            intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 2);
549
                            finalConvertView2.getContext().startActivity(intent);
550
                        }
551
                    });
443
                }
552
                }
553
554
555
444
                //设置删除
556
                //设置删除
445
                String userid = datas.get(position).getString("userid");
557
                String userid = datas.get(position).getString("userid");
446
                final String id = datas.get(position).getString("id");
558
                final String id = datas.get(position).getString("id");
505
        TextView tv_pdelete, tv_pname, tv_sname, tv_ptime, tv_stime, tv_pcontext, tv_scontext, tv_preply, tv_pcar, tv_more, tv_pzan;
617
        TextView tv_pdelete, tv_pname, tv_sname, tv_ptime, tv_stime, tv_pcontext, tv_scontext, tv_preply, tv_pcar, tv_more, tv_pzan;
506
        ImageView iv_picon, certified_icon, high_grade_comment_icon;
618
        ImageView iv_picon, certified_icon, high_grade_comment_icon;
507
        LinearLayout ll_pzan;
619
        LinearLayout ll_pzan;
508
        ImageView iv_havemessage, iv_commentPic;
620
        ImageView iv_havemessage, iv_commentPic,imgTwo,imgThree,imgVideo,imgStart;
509
        ImageView iv_pgrade, iv_pzan, iv_level_img;
621
        ImageView iv_pgrade, iv_pzan, iv_level_img;
510
        TagFlowLayout fl_ptag;
622
        TagFlowLayout fl_ptag;
511
        ListView lv_scomment;
623
        ListView lv_scomment;
512
        RelativeLayout parent;
624
        RelativeLayout parent,imgLayout;
513
        View vvv;
625
        View vvv;
514
    }
626
    }
515
627

+ 1 - 1
app/src/main/java/com/electric/chargingpile/application/MainApplication.java

97
//    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
97
//    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
98

98

99
        public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
99
        public static String urlNew = "http://123.56.67.7:83/api/0300";// 一电测试环境
100
        public static String d1evTestUrl = "https://d1ev-new.yiduyongche.com";// 一电测试环境
100
        public static String d1evTestUrl = "https://d1ev-new.yiduyongche.com";// 评论上传视频
101
        public static String CDN = "https://cdn-fs.d1ev.com";
101
        public static String CDN = "https://cdn-fs.d1ev.com";
102
//    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
102
//    public static String urlNew = "https://api.touchev.com:83/api/0300";// 一电正式环境
103

103


+ 2 - 0
app/src/main/java/com/electric/chargingpile/fragment/ZhanCommentFragment.java

6
import android.os.Handler;
6
import android.os.Handler;
7
import androidx.fragment.app.Fragment;
7
import androidx.fragment.app.Fragment;
8
import androidx.core.content.ContextCompat;
8
import androidx.core.content.ContextCompat;
9
10
import android.util.Log;
9
import android.util.TypedValue;
11
import android.util.TypedValue;
10
import android.view.LayoutInflater;
12
import android.view.LayoutInflater;
11
import android.view.View;
13
import android.view.View;

+ 2 - 1
app/src/main/res/layout/activity_image_pager.xml

10
        android:background="@color/black" />
10
        android:background="@color/black" />
11
11
12
    <TextView
12
    <TextView
13
        android:layout_marginTop="37dp"
13
        android:id="@+id/indicator"
14
        android:id="@+id/indicator"
14
        android:layout_width="match_parent"
15
        android:layout_width="match_parent"
15
        android:layout_height="wrap_content"
16
        android:layout_height="wrap_content"
16
        android:layout_gravity="bottom"
17
        android:layout_gravity="top"
17
        android:gravity="center"
18
        android:gravity="center"
18
        android:textSize="18sp"
19
        android:textSize="18sp"
19
        android:textColor="@android:color/white"
20
        android:textColor="@android:color/white"

+ 52 - 8
app/src/main/res/layout/item_newpinglun.xml

8
    android:background="#ffffff"
8
    android:background="#ffffff"
9
    android:orientation="vertical">
9
    android:orientation="vertical">
10
10
11
    <RelativeLayout
11
    <RelativeLayout xmlns:tools="http://schemas.android.com/tools"
12
        android:layout_width="match_parent"
12
        android:layout_width="match_parent"
13
        android:layout_height="match_parent"
13
        android:layout_height="match_parent"
14
        android:background="@color/bg_row">
14
        android:background="@color/bg_row">
68
            android:layout_toEndOf="@+id/rl_icon" />
68
            android:layout_toEndOf="@+id/rl_icon" />
69
69
70
        <RelativeLayout
70
        <RelativeLayout
71
            tools:visibility="visible"
71
            android:id="@+id/rl_grade"
72
            android:id="@+id/rl_grade"
72
            android:layout_width="wrap_content"
73
            android:layout_width="wrap_content"
73
            android:layout_height="wrap_content"
74
            android:layout_height="wrap_content"
127
128
128
        </com.zhy.view.flowlayout.TagFlowLayout>
129
        </com.zhy.view.flowlayout.TagFlowLayout>
129
130
130
        <ImageView
131
            android:layout_width="65dp"
132
            android:layout_height="65dp"
133
            android:id="@+id/iv_commentPic"
131
        <RelativeLayout
134
            android:layout_marginTop="10dp"
132
            android:layout_marginTop="10dp"
133
            android:id="@+id/imgLayout"
135
            android:layout_below="@+id/id_flowlayout_activity"
134
            android:layout_below="@+id/id_flowlayout_activity"
136
            android:layout_alignLeft="@+id/tv_comment"
135
            android:layout_alignLeft="@+id/tv_comment"
137
            android:scaleType="centerCrop"
138
            android:visibility="gone"/>
136
            android:layout_width="match_parent"
137
            android:layout_height="wrap_content">
138
            <ImageView
139
                tools:visibility="visible"
140
                android:id="@+id/iv_commentPic"
141
                android:layout_width="65dp"
142
                android:layout_height="65dp"
143
                android:scaleType="centerCrop"
144
                android:visibility="gone" />
145
            <ImageView
146
                android:layout_marginEnd="4dp"
147
                android:layout_marginStart="4dp"
148
                android:id="@+id/imgTwo"
149
                tools:visibility="visible"
150
                android:layout_width="65dp"
151
                android:layout_height="65dp"
152
                android:layout_toRightOf="@+id/iv_commentPic"
153
                android:scaleType="centerCrop"
154
                android:visibility="gone" />
155
            <ImageView
156
                android:id="@+id/imgThree"
157
                tools:visibility="visible"
158
                android:layout_width="65dp"
159
                android:layout_height="65dp"
160
                android:layout_toRightOf="@+id/imgTwo"
161
                android:scaleType="centerCrop"
162
                android:visibility="gone" />
163
164
            <ImageView
165
                tools:visibility="visible"
166
                android:id="@+id/imgVideo"
167
                android:layout_width="110dp"
168
                android:layout_height="62dp"
169
                android:scaleType="centerCrop"
170
                android:visibility="gone" />
171
172
            <ImageView
173
                android:layout_centerInParent="true"
174
                android:id="@+id/imgStart"
175
                android:layout_width="wrap_content"
176
                android:layout_height="wrap_content"
177
                android:layout_alignEnd="@+id/imgVideo"
178
                android:layout_alignParentStart="true"
179
                android:src="@drawable/app_talk_video_icon"
180
                android:visibility="gone"
181
                tools:visibility="visible" />
182
        </RelativeLayout>
139
183
140
184
141
        <TextView
185
        <TextView
159
            android:background="#fafafa"
203
            android:background="#fafafa"
160
            android:divider="@null"
204
            android:divider="@null"
161
            android:visibility="visible"
205
            android:visibility="visible"
162
            android:layout_below="@+id/iv_commentPic"
206
            android:layout_below="@+id/imgLayout"
163
            android:layout_toRightOf="@+id/rl_icon"
207
            android:layout_toRightOf="@+id/rl_icon"
164
            android:layout_toEndOf="@+id/rl_icon"
208
            android:layout_toEndOf="@+id/rl_icon"
165
            android:layout_marginTop="10dp"
209
            android:layout_marginTop="10dp"

+ 61 - 11
app/src/main/res/layout/item_zhancomments.xml

145
            android:visibility="visible"
145
            android:visibility="visible"
146
            zhy:max_select="-1" />
146
            zhy:max_select="-1" />
147
147
148
        <ImageView
149
            android:id="@+id/iv_commentPic"
150
            android:layout_width="65dp"
151
            android:layout_height="65dp"
148
        <RelativeLayout
149
            android:layout_marginTop="10dp"
150
            android:id="@+id/imgLayout"
152
            android:layout_below="@+id/fl_ptag"
151
            android:layout_below="@+id/fl_ptag"
153
            android:layout_alignLeft="@+id/tv_pcontext"
152
            android:layout_alignLeft="@+id/tv_pcontext"
154
            android:layout_marginTop="10dp"
155
            android:scaleType="centerCrop"
156
            android:visibility="gone" />
153
            android:layout_width="match_parent"
154
            android:layout_height="wrap_content">
155
            <ImageView
156
                tools:visibility="visible"
157
                android:id="@+id/iv_commentPic"
158
                android:layout_width="65dp"
159
                android:layout_height="65dp"
160
                android:scaleType="centerCrop"
161
                android:visibility="gone" />
162
            <ImageView
163
                android:layout_marginEnd="4dp"
164
                android:layout_marginStart="4dp"
165
                android:id="@+id/imgTwo"
166
                tools:visibility="visible"
167
                android:layout_width="65dp"
168
                android:layout_height="65dp"
169
                android:layout_toRightOf="@+id/iv_commentPic"
170
                android:scaleType="centerCrop"
171
                android:visibility="gone" />
172
            <ImageView
173
                android:id="@+id/imgThree"
174
                tools:visibility="visible"
175
                android:layout_width="65dp"
176
                android:layout_height="65dp"
177
                android:layout_toRightOf="@+id/imgTwo"
178
                android:scaleType="centerCrop"
179
                android:visibility="gone" />
180
181
            <ImageView
182
                tools:visibility="visible"
183
                android:id="@+id/imgVideo"
184
                android:layout_width="110dp"
185
                android:layout_height="62dp"
186
                android:scaleType="centerCrop"
187
                android:visibility="gone" />
188
189
            <ImageView
190
                android:layout_centerInParent="true"
191
                android:id="@+id/imgStart"
192
                android:layout_width="wrap_content"
193
                android:layout_height="wrap_content"
194
                android:layout_alignEnd="@+id/imgVideo"
195
                android:layout_alignParentStart="true"
196
                android:src="@drawable/app_talk_video_icon"
197
                android:visibility="gone"
198
                tools:visibility="visible" />
199
        </RelativeLayout>
157
200
158
        <TextView
201
        <TextView
159
            android:id="@+id/tv_ptime"
202
            android:id="@+id/tv_ptime"
160
            android:layout_width="wrap_content"
203
            android:layout_width="wrap_content"
161
            android:layout_height="wrap_content"
204
            android:layout_height="wrap_content"
162
            android:layout_below="@+id/iv_commentPic"
205
            android:layout_below="@+id/imgLayout"
163
            android:layout_alignStart="@+id/tv_pcontext"
206
            android:layout_alignStart="@+id/tv_pcontext"
164
            android:layout_alignLeft="@+id/tv_pcontext"
207
            android:layout_alignLeft="@+id/tv_pcontext"
165
            android:layout_marginTop="10dp"
208
            android:layout_marginTop="10dp"
170
            android:textSize="12sp" />
213
            android:textSize="12sp" />
171
214
172
        <TextView
215
        <TextView
216
            tools:visibility="visible"
173
            android:id="@+id/tv_pdelete"
217
            android:id="@+id/tv_pdelete"
174
            android:layout_width="wrap_content"
218
            android:layout_width="wrap_content"
175
            android:layout_height="wrap_content"
219
            android:layout_height="wrap_content"
187
            android:id="@+id/ll_pzan"
231
            android:id="@+id/ll_pzan"
188
            android:layout_width="wrap_content"
232
            android:layout_width="wrap_content"
189
            android:layout_height="wrap_content"
233
            android:layout_height="wrap_content"
190
            android:layout_below="@+id/iv_commentPic"
234
            android:layout_below="@+id/imgLayout"
191
            android:layout_toLeftOf="@+id/tv_preply"
235
            android:layout_toLeftOf="@+id/tv_preply"
192
            android:paddingLeft="10dp"
236
            android:paddingLeft="10dp"
193
            android:paddingTop="10dp"
237
            android:paddingTop="10dp"
217
261
218
262
219
        <TextView
263
        <TextView
264
220
            android:id="@+id/tv_preply"
265
            android:id="@+id/tv_preply"
221
            android:layout_width="wrap_content"
266
            android:layout_width="wrap_content"
222
            android:layout_height="wrap_content"
267
            android:layout_height="wrap_content"
223
            android:layout_below="@+id/iv_commentPic"
268
            android:layout_below="@+id/imgLayout"
224
            android:layout_alignEnd="@+id/tv_pcontext"
269
            android:layout_alignEnd="@+id/tv_pcontext"
225
            android:layout_alignRight="@+id/tv_pcontext"
270
            android:layout_alignRight="@+id/tv_pcontext"
226
            android:layout_alignParentRight="true"
271
            android:layout_alignParentRight="true"
236
281
237
282
238
        <TextView
283
        <TextView
284
            tools:visibility="visible"
239
            android:id="@+id/tv_childName"
285
            android:id="@+id/tv_childName"
240
            android:layout_width="wrap_content"
286
            android:layout_width="wrap_content"
241
            android:layout_height="wrap_content"
287
            android:layout_height="wrap_content"
248
            android:visibility="gone" />
294
            android:visibility="gone" />
249
295
250
        <TextView
296
        <TextView
297
            tools:visibility="visible"
251
            android:id="@+id/textView14"
298
            android:id="@+id/textView14"
252
            android:layout_width="wrap_content"
299
            android:layout_width="wrap_content"
253
            android:layout_height="wrap_content"
300
            android:layout_height="wrap_content"
260
            android:visibility="gone" />
307
            android:visibility="gone" />
261
308
262
        <TextView
309
        <TextView
310
            tools:visibility="visible"
263
            android:id="@+id/tv_parentName"
311
            android:id="@+id/tv_parentName"
264
            android:layout_width="wrap_content"
312
            android:layout_width="wrap_content"
265
            android:layout_height="wrap_content"
313
            android:layout_height="wrap_content"
272
            android:visibility="gone" />
320
            android:visibility="gone" />
273
321
274
        <TextView
322
        <TextView
323
            tools:visibility="visible"
275
            android:id="@+id/tv_commentDetail"
324
            android:id="@+id/tv_commentDetail"
276
            android:layout_width="wrap_content"
325
            android:layout_width="wrap_content"
277
            android:layout_height="wrap_content"
326
            android:layout_height="wrap_content"
296
            android:paddingLeft="15dp" />
345
            android:paddingLeft="15dp" />
297
346
298
        <TextView
347
        <TextView
348
            tools:visibility="visible"
299
            android:id="@+id/tv_more"
349
            android:id="@+id/tv_more"
300
            android:layout_width="match_parent"
350
            android:layout_width="match_parent"
301
            android:layout_height="40dp"
351
            android:layout_height="40dp"
352
        <!--android:background="@color/bg_row"-->
402
        <!--android:background="@color/bg_row"-->
353
        <!--android:layout_below="@+id/ll_comment"/>-->
403
        <!--android:layout_below="@+id/ll_comment"/>-->
354
        <View
404
        <View
355
405
            tools:visibility="visible"
356
            android:layout_width="match_parent"
406
            android:layout_width="match_parent"
357
            android:layout_height="0.5dp"
407
            android:layout_height="0.5dp"
358
            android:layout_below="@+id/tv_ptime"
408
            android:layout_below="@+id/tv_ptime"

+ 1 - 0
app/src/main/res/values/color.xml

82
    <color name="progress_background">#ededed</color>
82
    <color name="progress_background">#ededed</color>
83
    <color name="blue">#4c90f9</color>
83
    <color name="blue">#4c90f9</color>
84
    <color name="topic_blue">#2fb3ff</color>
84
    <color name="topic_blue">#2fb3ff</color>
85
    <color name="topic_green">#3EC34C</color>
85
    <color name="itemlist">#f4f4f4</color>
86
    <color name="itemlist">#f4f4f4</color>
86
    <color name="act_background">#efefef</color>
87
    <color name="act_background">#efefef</color>
87
    <color name="phone_bg">#f6f6f6</color>
88
    <color name="phone_bg">#f6f6f6</color>