|
@ -14,6 +14,7 @@ import android.os.Handler;
|
14
|
14
|
import android.os.Message;
|
15
|
15
|
import android.text.SpannableString;
|
16
|
16
|
import android.text.Spanned;
|
|
17
|
import android.text.TextUtils;
|
17
|
18
|
import android.text.style.ForegroundColorSpan;
|
18
|
19
|
import android.util.Log;
|
19
|
20
|
import android.view.LayoutInflater;
|
|
@ -22,6 +23,7 @@ import android.view.ViewGroup;
|
22
|
23
|
import android.view.ViewTreeObserver;
|
23
|
24
|
import android.widget.ImageView;
|
24
|
25
|
import android.widget.LinearLayout;
|
|
26
|
import android.widget.ListView;
|
25
|
27
|
import android.widget.RelativeLayout;
|
26
|
28
|
import android.widget.Space;
|
27
|
29
|
import android.widget.TextView;
|
|
@ -33,21 +35,26 @@ import androidx.fragment.app.Fragment;
|
33
|
35
|
import com.amap.api.maps.AMapUtils;
|
34
|
36
|
import com.amap.api.maps.model.LatLng;
|
35
|
37
|
import com.blankj.utilcode.util.LogUtils;
|
|
38
|
import com.bumptech.glide.Glide;
|
36
|
39
|
import com.electric.chargingpile.R;
|
37
|
40
|
import com.electric.chargingpile.activity.AlterOneActivity;
|
38
|
41
|
import com.electric.chargingpile.activity.ChargingQianDaoActivity;
|
|
42
|
import com.electric.chargingpile.activity.CommentVideoDetailActivity;
|
39
|
43
|
import com.electric.chargingpile.activity.ImagePagerActivity;
|
40
|
44
|
import com.electric.chargingpile.activity.LoginActivity;
|
41
|
45
|
import com.electric.chargingpile.activity.MainMapActivity;
|
42
|
46
|
import com.electric.chargingpile.activity.NewZhanDetailsActivity;
|
43
|
47
|
import com.electric.chargingpile.activity.PriceDetailsActivity;
|
44
|
48
|
import com.electric.chargingpile.activity.ZhanDetailsNew;
|
|
49
|
import com.electric.chargingpile.adapter.ZhanCommentsAapter;
|
45
|
50
|
import com.electric.chargingpile.application.MainApplication;
|
46
|
51
|
import com.electric.chargingpile.data.ChartData;
|
47
|
52
|
import com.electric.chargingpile.data.MyOtto;
|
48
|
53
|
import com.electric.chargingpile.data.PileData;
|
49
|
54
|
import com.electric.chargingpile.data.RankinglistRefreshEvent;
|
50
|
55
|
import com.electric.chargingpile.data.Zhan;
|
|
56
|
import com.electric.chargingpile.util.CarTypeUtil;
|
|
57
|
import com.electric.chargingpile.util.CircleTransform;
|
51
|
58
|
import com.electric.chargingpile.util.DES;
|
52
|
59
|
import com.electric.chargingpile.util.DES3;
|
53
|
60
|
import com.electric.chargingpile.util.DES3S;
|
|
@ -114,29 +121,29 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
114
|
121
|
private Zhan zhan = null;
|
115
|
122
|
private CombinedChart mChart;
|
116
|
123
|
public static ArrayList<JSONObject> datas;
|
117
|
|
private LinearLayout rl_claimer, ll_claimer, ll_phone, ll_juli, ll_juli1, ll_yunyingshang;
|
|
124
|
private LinearLayout rl_claimer, ll_claimer, ll_phone, ll_juli, ll_juli1;
|
118
|
125
|
private RelativeLayout rl_charging_qiandao, rl_grade;
|
119
|
|
public static RelativeLayout rl_new_comment;
|
120
|
|
public static TextView tv_new_comment, tv_new_name, tv_new_car, tv_new_time;
|
121
|
|
public static CircleImageView iv_new_icon;
|
122
|
|
public static ImageView iv_new_pingfen;
|
123
|
|
public static ImageView ssv, iv_level_img;
|
|
126
|
|
|
127
|
|
|
128
|
|
|
129
|
|
|
130
|
public static ImageView ssv;
|
124
|
131
|
public static CustomScrollView sv;
|
125
|
132
|
private String gd_jing, gd_wei;
|
126
|
|
private ImageView iv_commentPic;
|
|
133
|
|
127
|
134
|
private CustomProgressDialog pd_info;
|
128
|
135
|
public static TextView tv_picnum;
|
129
|
136
|
private Socket socket;
|
130
|
137
|
Context mContext;
|
131
|
138
|
private TextView tv_claimer, tv_grade;
|
132
|
|
private View view_789;
|
|
139
|
|
133
|
140
|
String zhan_name, zhan_id, tid, zhan_address, supplier, total_num, fast_num, slow_num, stop_cost, charge_cost, telephone, remarks, suit_car, claimer, belong_attribute, poi_jing, poi_wei, charge_cost_way, other_cost, work_open, work_close;
|
134
|
141
|
private TextView current_time_slot, tv_detail_charging_enter;
|
135
|
142
|
private LinearLayout tv_cost_info;
|
136
|
143
|
private LinearLayout ll_no_fenshi, ll_yes_fenshi;
|
137
|
144
|
private TextView tv_today_num;
|
138
|
145
|
|
139
|
|
private ImageView collect, iv_fast, iv_slow, type, share, iv_call, zhi, iv_zhanpic, iv_grade, iv_location;
|
|
146
|
private ImageView collect, iv_fast, iv_slow, type, share, iv_call, zhi, iv_zhanpic, iv_grade;
|
140
|
147
|
private TextView tv_yunyingshang, fast, slow, open_object, tv_work_open, tv_work_close, holiday_open, holiday_close,
|
141
|
148
|
belong_name, chargeDetail, tv_submit, parkCost, tv_total, distance1, distance, address, tv_remark, tvcostNum, other;
|
142
|
149
|
String key = "aSU4wsxf";
|
|
@ -148,8 +155,8 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
148
|
155
|
String token_url = "http://open.teld.cn/OAuth/Token";// 表示使用的授权模式
|
149
|
156
|
String postSta_url = "http://open.teld.cn/api/Sta/PostStaDetail";// 表示使用的授权模式
|
150
|
157
|
String acNum, dcNum, acableNum, dcableNum;
|
151
|
|
public static TagFlowLayout mFlowLayout;
|
152
|
|
public static TextView tv_1;
|
|
158
|
|
|
159
|
|
153
|
160
|
private String[] stringArr;
|
154
|
161
|
private RelativeLayout rlclaimer;
|
155
|
162
|
private View detail_view;
|
|
@ -158,6 +165,16 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
158
|
165
|
private String freeStatus;
|
159
|
166
|
private LoadingDialog loadingDialog;
|
160
|
167
|
|
|
168
|
|
|
169
|
private TextView tv_pdelete, tv_pname, tv_sname, tv_ptime, tv_stime, tv_pcontext, tv_scontext, tv_preply, tv_pcar, tv_more, tv_pzan;
|
|
170
|
private ImageView iv_picon, certified_icon, high_grade_comment_icon;
|
|
171
|
private LinearLayout ll_pzan;
|
|
172
|
private ImageView iv_havemessage ,imgTwo,imgThree,imgVideo,imgStart,iv_commentPic;
|
|
173
|
private ImageView iv_pgrade, iv_pzan, iv_level_img;
|
|
174
|
private TagFlowLayout fl_ptag;
|
|
175
|
private ListView lv_scomment;
|
|
176
|
private RelativeLayout parent,imgLayout;
|
|
177
|
|
161
|
178
|
private Handler handler = new Handler() {
|
162
|
179
|
// 主线程通过这个方法处理消息
|
163
|
180
|
@TargetApi(Build.VERSION_CODES.KITKAT)
|
|
@ -585,212 +602,159 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
585
|
602
|
break;
|
586
|
603
|
|
587
|
604
|
case 6:
|
588
|
|
if (null != msg.obj) {
|
589
|
|
JSONArray jsonArray = null;
|
590
|
|
String s = null;
|
591
|
|
try {
|
592
|
|
jsonArray = new JSONArray(msg.obj.toString());
|
593
|
|
|
594
|
|
// Log.e("s==",s);
|
595
|
|
} catch (JSONException e) {
|
596
|
|
e.printStackTrace();
|
597
|
|
}
|
598
|
|
if (null != jsonArray) {
|
599
|
|
if (jsonArray.length() > 0) {
|
600
|
|
rl_new_comment.setVisibility(View.VISIBLE);
|
601
|
|
try {
|
602
|
|
s = jsonArray.get(0).toString();
|
603
|
|
} catch (JSONException e) {
|
604
|
|
e.printStackTrace();
|
605
|
|
}
|
606
|
|
String nickname = JsonUtils.getKeyResult(s, "nickname");
|
607
|
|
String tel = JsonUtils.getKeyResult(s, "tel");
|
608
|
|
String content = JsonUtils.getKeyResult(s, "content");
|
609
|
|
String chexing = JsonUtils.getKeyResult(s, "chexing");
|
610
|
|
String star_level = JsonUtils.getKeyResult(s, "star_level");
|
611
|
|
String userpic = JsonUtils.getKeyResult(s, "userpic");
|
612
|
|
String addtime = JsonUtils.getKeyResult(s, "addtime");
|
613
|
|
String tag = JsonUtils.getKeyResult(s, "tag");
|
614
|
|
String thumUrl = JsonUtils.getKeyResult(s, "thumUrl");
|
615
|
|
String fileUrl = JsonUtils.getKeyResult(s, "fileUrl");
|
616
|
|
String title = JsonUtils.getKeyResult(s, "title");
|
617
|
|
// Log.e(TAG, "handleMessage: title="+title );
|
618
|
|
|
619
|
|
if (title != null) {
|
620
|
|
if (title.equals("")) {
|
621
|
|
iv_level_img.setVisibility(View.GONE);
|
622
|
|
} else if (title.equals("V0")) {
|
623
|
|
iv_level_img.setVisibility(View.GONE);
|
624
|
|
// holder.iv_level_img.setImageResource(R.drawable.icon_level_putong);
|
625
|
|
} else if (title.equals("V1")) {
|
626
|
|
iv_level_img.setVisibility(View.VISIBLE);
|
627
|
|
iv_level_img.setImageResource(R.drawable.icon_qingtong);
|
628
|
|
} else if (title.equals("V2")) {
|
629
|
|
iv_level_img.setVisibility(View.VISIBLE);
|
630
|
|
iv_level_img.setImageResource(R.drawable.icon_baiyin);
|
631
|
|
} else if (title.equals("V3")) {
|
632
|
|
iv_level_img.setVisibility(View.VISIBLE);
|
633
|
|
iv_level_img.setImageResource(R.drawable.icon_huangjin);
|
634
|
|
} else if (title.equals("V4")) {
|
635
|
|
iv_level_img.setVisibility(View.VISIBLE);
|
636
|
|
iv_level_img.setImageResource(R.drawable.icon_bojin);
|
637
|
|
} else if (title.equals("V5")) {
|
638
|
|
iv_level_img.setVisibility(View.VISIBLE);
|
639
|
|
iv_level_img.setImageResource(R.drawable.icon_zuanshi);
|
640
|
|
}
|
641
|
|
}
|
642
|
|
|
643
|
|
if (thumUrl != null && fileUrl != null && !thumUrl.equals("") && !fileUrl.equals("")) {
|
644
|
|
iv_commentPic.setVisibility(View.VISIBLE);
|
645
|
|
final String url = MainApplication.url + "/zhannew/uploadfile/" + thumUrl;
|
646
|
|
final String file_url = MainApplication.url + "/zhannew/uploadfile/" + fileUrl;
|
647
|
|
final String[] ss = {file_url};
|
648
|
|
Picasso.with(MainApplication.context)
|
649
|
|
.load(url)
|
650
|
|
.into(iv_commentPic);
|
651
|
|
iv_commentPic.setOnClickListener(new View.OnClickListener() {
|
652
|
|
@Override
|
653
|
|
public void onClick(View v) {
|
654
|
|
Intent intent = new Intent(getContext(), ImagePagerActivity.class);
|
655
|
|
// 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
|
656
|
|
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, ss);
|
657
|
|
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
|
658
|
|
getContext().startActivity(intent);
|
659
|
|
}
|
660
|
|
});
|
661
|
|
} else {
|
662
|
|
iv_commentPic.setVisibility(View.GONE);
|
663
|
|
}
|
664
|
|
if (tag != null && tag.equals("")) {
|
665
|
|
mFlowLayout.setVisibility(View.GONE);
|
666
|
|
} else {
|
667
|
|
if (null == getActivity()) {
|
668
|
|
mFlowLayout.setVisibility(View.GONE);
|
669
|
|
} else {
|
670
|
|
if (null != getActivity()) {
|
671
|
|
mFlowLayout.setVisibility(View.VISIBLE);
|
672
|
|
final LayoutInflater mInflater = LayoutInflater.from(getActivity());
|
673
|
|
stringArr = tag.split(",");
|
674
|
|
mFlowLayout.setClickable(false);
|
675
|
|
mFlowLayout.setEnabled(false);
|
676
|
|
mFlowLayout.setAdapter(new TagAdapter<String>(stringArr) {
|
677
|
|
@Override
|
678
|
|
public View getView(FlowLayout parent, int position, String s) {
|
679
|
|
TextView tv = (TextView) mInflater.inflate(R.layout.tv1,
|
680
|
|
mFlowLayout, false);
|
681
|
|
tv.setText(s);
|
682
|
|
return tv;
|
683
|
|
}
|
684
|
|
});
|
685
|
|
}
|
686
|
|
}
|
687
|
|
}
|
688
|
|
tv_new_time.setText(TimeStamp2Date(addtime, "yyyy-MM-dd"));
|
689
|
|
String url = MainApplication.url + "/zhannew/uploadfile/" + userpic;
|
690
|
|
// Log.e(TAG, "handleMessage: userpic="+userpic );
|
691
|
|
// Log.e(TAG, "handleMessage: userpic-url="+url );
|
692
|
|
// Log.d("ss==",url);
|
693
|
|
// if (null != getActivity()) {
|
694
|
|
// Glide.with(getActivity())
|
|
605
|
// if (null != msg.obj) {
|
|
606
|
// JSONArray jsonArray = null;
|
|
607
|
// String s = null;
|
|
608
|
// try {
|
|
609
|
// jsonArray = new JSONArray(msg.obj.toString());
|
|
610
|
//
|
|
611
|
//// Log.e("s==",s);
|
|
612
|
// } catch (JSONException e) {
|
|
613
|
// e.printStackTrace();
|
|
614
|
// }
|
|
615
|
// if (null != jsonArray) {
|
|
616
|
// if (jsonArray.length() > 0) {
|
|
617
|
// rl_new_comment.setVisibility(View.VISIBLE);
|
|
618
|
// try {
|
|
619
|
// s = jsonArray.get(0).toString();
|
|
620
|
// } catch (JSONException e) {
|
|
621
|
// e.printStackTrace();
|
|
622
|
// }
|
|
623
|
// String nickname = JsonUtils.getKeyResult(s, "nickname");
|
|
624
|
// String tel = JsonUtils.getKeyResult(s, "tel");
|
|
625
|
// String chexing = JsonUtils.getKeyResult(s, "chexing");
|
|
626
|
// String star_level = JsonUtils.getKeyResult(s, "star_level");
|
|
627
|
// String userpic = JsonUtils.getKeyResult(s, "userpic");
|
|
628
|
// String addtime = JsonUtils.getKeyResult(s, "addtime");
|
|
629
|
// String tag = JsonUtils.getKeyResult(s, "tag");
|
|
630
|
// String thumUrl = JsonUtils.getKeyResult(s, "thumUrl");
|
|
631
|
// String fileUrl = JsonUtils.getKeyResult(s, "fileUrl");
|
|
632
|
//1
|
|
633
|
//
|
|
634
|
// if (thumUrl != null && fileUrl != null && !thumUrl.equals("") && !fileUrl.equals("")) {
|
|
635
|
// iv_commentPic.setVisibility(View.VISIBLE);
|
|
636
|
// final String url = MainApplication.url + "/zhannew/uploadfile/" + thumUrl;
|
|
637
|
// final String file_url = MainApplication.url + "/zhannew/uploadfile/" + fileUrl;
|
|
638
|
// final String[] ss = {file_url};
|
|
639
|
// Picasso.with(MainApplication.context)
|
695
|
640
|
// .load(url)
|
696
|
|
// .placeholder(R.drawable.icon_user1118)
|
697
|
|
// .error(R.drawable.icon_user1118)
|
698
|
|
// .into(iv_new_icon);
|
699
|
|
// }else {
|
700
|
|
// iv_new_icon.setImageResource(R.drawable.icon_user1118);
|
|
641
|
// .into(iv_commentPic);
|
|
642
|
// iv_commentPic.setOnClickListener(new View.OnClickListener() {
|
|
643
|
// @Override
|
|
644
|
// public void onClick(View v) {
|
|
645
|
// Intent intent = new Intent(getContext(), ImagePagerActivity.class);
|
|
646
|
// // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
|
|
647
|
// intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, ss);
|
|
648
|
// intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
|
|
649
|
// getContext().startActivity(intent);
|
|
650
|
// }
|
|
651
|
// });
|
|
652
|
// } else {
|
|
653
|
// iv_commentPic.setVisibility(View.GONE);
|
701
|
654
|
// }
|
702
|
|
// PicassoUtil.loadingNetImage(getActivity(), url
|
703
|
|
// , iv_new_icon);
|
704
|
|
Picasso.with(MainApplication.context)
|
705
|
|
.load(url)
|
706
|
|
.error(R.drawable.icon_user1118)
|
707
|
|
.placeholder(R.drawable.icon_user1118)
|
708
|
|
.into(iv_new_icon);
|
709
|
|
|
710
|
|
if (content.equals("") || content.equals(" ")) {
|
711
|
|
tv_new_comment.setVisibility(View.GONE);
|
712
|
|
} else {
|
713
|
|
tv_new_comment.setVisibility(View.VISIBLE);
|
714
|
|
SpannableString ss = new SpannableString(content);
|
715
|
|
Pattern pattern = Pattern.compile("#[0-9a-zA-Z\\u4e00-\\u9fa5]+#");
|
716
|
|
Matcher matcher = pattern.matcher(ss);
|
717
|
|
while (matcher.find()) {
|
718
|
|
int start = matcher.start();
|
719
|
|
int end = matcher.end();
|
720
|
|
ss.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.topic_blue)), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
721
|
|
|
722
|
|
}
|
723
|
|
tv_new_comment.setText(ss);
|
724
|
|
}
|
725
|
|
|
726
|
|
|
727
|
|
tv_new_name.setText(nickname);
|
728
|
|
if (!nickname.equals("") && !nickname.equals("null")) {
|
729
|
|
tv_new_name.setText(nickname);
|
730
|
|
} else {
|
731
|
|
tv_new_name.setText(Util.handlePhoneComment(tel));
|
732
|
|
}
|
733
|
|
|
734
|
|
if ("待购".equals(chexing)) {
|
735
|
|
tv_new_car.setText("待购");
|
736
|
|
} else {
|
737
|
|
String[] strarray = chexing.split("\\$\\$");
|
738
|
|
String name0 = null, name1 = null;
|
739
|
|
if (strarray.length > 1) {
|
740
|
|
name0 = strarray[0];//江淮
|
741
|
|
name1 = strarray[1];//iEV3
|
742
|
|
}
|
743
|
|
if (chexing.equals("nullnull") || chexing == null || chexing.equals("") || chexing.equals("null") || chexing.equals("品牌$$车型") || chexing.equals("null$$null")) {
|
744
|
|
tv_new_car.setText("");
|
745
|
|
} else {
|
746
|
|
tv_new_car.setText(name0 + name1);
|
747
|
|
}
|
748
|
|
}
|
749
|
|
if (star_level.equals("")) {
|
750
|
|
star_level = "0";
|
751
|
|
}
|
752
|
|
double d = Double.parseDouble(star_level);
|
753
|
|
if (d == 0) {
|
754
|
|
iv_new_pingfen.setVisibility(View.GONE);
|
755
|
|
} else {
|
756
|
|
if (d > 0 && d < 1) {
|
757
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_05xing);
|
758
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
759
|
|
} else if (d >= 1 && d < 1.5) {
|
760
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
761
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_1xing);
|
762
|
|
} else if (d >= 1.5 && d < 2) {
|
763
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
764
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_15xing);
|
765
|
|
} else if (d >= 2 && d < 2.5) {
|
766
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
767
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_2xing);
|
768
|
|
} else if (d >= 2.5 && d < 3) {
|
769
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
770
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_25xing);
|
771
|
|
} else if (d >= 3 && d < 3.5) {
|
772
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
773
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_3xing);
|
774
|
|
} else if (d >= 3.5 && d < 4) {
|
775
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
776
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_35xing);
|
777
|
|
} else if (d >= 4 && d < 4.5) {
|
778
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
779
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_4xing);
|
780
|
|
} else if (d >= 4.5 && d < 5) {
|
781
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
782
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_45xing);
|
783
|
|
} else {
|
784
|
|
iv_new_pingfen.setVisibility(View.VISIBLE);
|
785
|
|
iv_new_pingfen.setImageResource(R.drawable.icon_5xing);
|
786
|
|
}
|
787
|
|
}
|
788
|
|
|
789
|
|
} else {
|
790
|
|
rl_new_comment.setVisibility(View.GONE);
|
791
|
|
}
|
792
|
|
}
|
793
|
|
}
|
|
655
|
// if (tag != null && tag.equals("")) {
|
|
656
|
// mFlowLayout.setVisibility(View.GONE);
|
|
657
|
// } else {
|
|
658
|
// if (null == getActivity()) {
|
|
659
|
// mFlowLayout.setVisibility(View.GONE);
|
|
660
|
// } else {
|
|
661
|
// if (null != getActivity()) {
|
|
662
|
// mFlowLayout.setVisibility(View.VISIBLE);
|
|
663
|
// final LayoutInflater mInflater = LayoutInflater.from(getActivity());
|
|
664
|
// stringArr = tag.split(",");
|
|
665
|
// mFlowLayout.setClickable(false);
|
|
666
|
// mFlowLayout.setEnabled(false);
|
|
667
|
// mFlowLayout.setAdapter(new TagAdapter<String>(stringArr) {
|
|
668
|
// @Override
|
|
669
|
// public View getView(FlowLayout parent, int position, String s) {
|
|
670
|
// TextView tv = (TextView) mInflater.inflate(R.layout.tv1,
|
|
671
|
// mFlowLayout, false);
|
|
672
|
// tv.setText(s);
|
|
673
|
// return tv;
|
|
674
|
// }
|
|
675
|
// });
|
|
676
|
// }
|
|
677
|
// }
|
|
678
|
// }
|
|
679
|
// tv_new_time.setText(TimeStamp2Date(addtime, "yyyy-MM-dd"));
|
|
680
|
// String url = MainApplication.url + "/zhannew/uploadfile/" + userpic;
|
|
681
|
//
|
|
682
|
// Picasso.with(MainApplication.context)
|
|
683
|
// .load(url)
|
|
684
|
// .error(R.drawable.icon_user1118)
|
|
685
|
// .placeholder(R.drawable.icon_user1118)
|
|
686
|
// .into(iv_new_icon);
|
|
687
|
//
|
|
688
|
//
|
|
689
|
//
|
|
690
|
//
|
|
691
|
// tv_new_name.setText(nickname);
|
|
692
|
// if (!nickname.equals("") && !nickname.equals("null")) {
|
|
693
|
// tv_new_name.setText(nickname);
|
|
694
|
// } else {
|
|
695
|
// tv_new_name.setText(Util.handlePhoneComment(tel));
|
|
696
|
// }
|
|
697
|
//
|
|
698
|
// if ("待购".equals(chexing)) {
|
|
699
|
// tv_new_car.setText("待购");
|
|
700
|
// } else {
|
|
701
|
// String[] strarray = chexing.split("\\$\\$");
|
|
702
|
// String name0 = null, name1 = null;
|
|
703
|
// if (strarray.length > 1) {
|
|
704
|
// name0 = strarray[0];//江淮
|
|
705
|
// name1 = strarray[1];//iEV3
|
|
706
|
// }
|
|
707
|
// if (chexing.equals("nullnull") || chexing == null || chexing.equals("") || chexing.equals("null") || chexing.equals("品牌$$车型") || chexing.equals("null$$null")) {
|
|
708
|
// tv_new_car.setText("");
|
|
709
|
// } else {
|
|
710
|
// tv_new_car.setText(name0 + name1);
|
|
711
|
// }
|
|
712
|
// }
|
|
713
|
// if (star_level.equals("")) {
|
|
714
|
// star_level = "0";
|
|
715
|
// }
|
|
716
|
// double d = Double.parseDouble(star_level);
|
|
717
|
// if (d == 0) {
|
|
718
|
// iv_new_pingfen.setVisibility(View.GONE);
|
|
719
|
// } else {
|
|
720
|
// if (d > 0 && d < 1) {
|
|
721
|
// iv_new_pingfen.setImageResource(R.drawable.icon_05xing);
|
|
722
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
723
|
// } else if (d >= 1 && d < 1.5) {
|
|
724
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
725
|
// iv_new_pingfen.setImageResource(R.drawable.icon_1xing);
|
|
726
|
// } else if (d >= 1.5 && d < 2) {
|
|
727
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
728
|
// iv_new_pingfen.setImageResource(R.drawable.icon_15xing);
|
|
729
|
// } else if (d >= 2 && d < 2.5) {
|
|
730
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
731
|
// iv_new_pingfen.setImageResource(R.drawable.icon_2xing);
|
|
732
|
// } else if (d >= 2.5 && d < 3) {
|
|
733
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
734
|
// iv_new_pingfen.setImageResource(R.drawable.icon_25xing);
|
|
735
|
// } else if (d >= 3 && d < 3.5) {
|
|
736
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
737
|
// iv_new_pingfen.setImageResource(R.drawable.icon_3xing);
|
|
738
|
// } else if (d >= 3.5 && d < 4) {
|
|
739
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
740
|
// iv_new_pingfen.setImageResource(R.drawable.icon_35xing);
|
|
741
|
// } else if (d >= 4 && d < 4.5) {
|
|
742
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
743
|
// iv_new_pingfen.setImageResource(R.drawable.icon_4xing);
|
|
744
|
// } else if (d >= 4.5 && d < 5) {
|
|
745
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
746
|
// iv_new_pingfen.setImageResource(R.drawable.icon_45xing);
|
|
747
|
// } else {
|
|
748
|
// iv_new_pingfen.setVisibility(View.VISIBLE);
|
|
749
|
// iv_new_pingfen.setImageResource(R.drawable.icon_5xing);
|
|
750
|
// }
|
|
751
|
// }
|
|
752
|
//
|
|
753
|
// } else {
|
|
754
|
// rl_new_comment.setVisibility(View.GONE);
|
|
755
|
// }
|
|
756
|
// }
|
|
757
|
// }
|
794
|
758
|
break;
|
795
|
759
|
|
796
|
760
|
default:
|
|
@ -802,6 +766,7 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
802
|
766
|
private ImageView scan_charge_btn;
|
803
|
767
|
private Space scan_charge_space;
|
804
|
768
|
private String telNum;
|
|
769
|
private RelativeLayout rl_new_comment;
|
805
|
770
|
|
806
|
771
|
@Override
|
807
|
772
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
@ -838,7 +803,7 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
838
|
803
|
MobclickAgent.onEvent(getActivity(), "0210");
|
839
|
804
|
}
|
840
|
805
|
});
|
841
|
|
eteCityTime(null);
|
|
806
|
//eteCityTime(null);
|
842
|
807
|
}
|
843
|
808
|
|
844
|
809
|
public String TimeStamp2Date(String timestampString, String formats) {
|
|
@ -893,7 +858,7 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
893
|
858
|
tv_cost_info.setOnClickListener(this);
|
894
|
859
|
|
895
|
860
|
current_time_slot = (TextView) v.findViewById(R.id.current_time_slot);
|
896
|
|
iv_level_img = (ImageView) v.findViewById(R.id.iv_level_img);
|
|
861
|
|
897
|
862
|
detail_view = v.findViewById(R.id.detail_view);
|
898
|
863
|
detail_claimer_remark = (LinearLayout) v.findViewById(R.id.detail_claimer_remark);
|
899
|
864
|
detail_tel = (RelativeLayout) v.findViewById(R.id.detail_tel);
|
|
@ -928,23 +893,37 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
928
|
893
|
detail_go_list = (TextView) v.findViewById(R.id.detail_charging_enter);
|
929
|
894
|
detail_go_list.setOnClickListener(this);
|
930
|
895
|
|
931
|
|
|
932
|
|
iv_commentPic = (ImageView) v.findViewById(R.id.iv_commentPic);
|
933
|
|
mFlowLayout = (TagFlowLayout) v.findViewById(R.id.id_flowlayout_activity);
|
934
|
|
rl_new_comment = (RelativeLayout) v.findViewById(R.id.rl_new_comment);
|
935
|
|
tv_1 = (TextView) v.findViewById(R.id.tv_1);
|
936
|
|
tv_new_comment = (TextView) v.findViewById(R.id.tv_new_comment);
|
937
|
|
tv_new_name = (TextView) v.findViewById(R.id.tv_new_name);
|
938
|
|
tv_new_car = (TextView) v.findViewById(R.id.tv_new_car);
|
939
|
|
tv_new_time = (TextView) v.findViewById(R.id.tv_new_time);
|
940
|
|
iv_location = (ImageView) v.findViewById(R.id.iv_location);
|
941
|
|
iv_new_pingfen = (ImageView) v.findViewById(R.id.iv_new_pingfen);
|
942
|
|
iv_new_icon = (CircleImageView) v.findViewById(R.id.iv_new_icon);
|
943
|
|
ll_yunyingshang = (LinearLayout) v.findViewById(R.id.ll_yunyingshang);
|
944
|
|
view_789 = v.findViewById(R.id.view_789);
|
945
|
896
|
scan_charge_btn = v.findViewById(R.id.scan_charge_btn);
|
946
|
897
|
scan_charge_btn.setOnClickListener(this);
|
947
|
898
|
scan_charge_space = v.findViewById(R.id.scan_charge_space);
|
|
899
|
|
|
900
|
rl_new_comment = v.findViewById(R.id.rl_new_comment);
|
|
901
|
|
|
902
|
tv_pname = (TextView) v.findViewById(R.id.tv_pname);
|
|
903
|
tv_pdelete = (TextView) v.findViewById(R.id.tv_pdelete);
|
|
904
|
tv_ptime = (TextView) v.findViewById(R.id.tv_ptime);
|
|
905
|
tv_pcontext = (TextView) v.findViewById(R.id.tv_pcontext);
|
|
906
|
tv_pcar = (TextView) v.findViewById(R.id.tv_pcar);
|
|
907
|
tv_preply = (TextView) v.findViewById(R.id.tv_preply);
|
|
908
|
tv_pzan = (TextView) v.findViewById(R.id.tv_pzan);
|
|
909
|
tv_more = (TextView) v.findViewById(R.id.tv_more);
|
|
910
|
lv_scomment = (ListView) v.findViewById(R.id.lv_scomment);
|
|
911
|
|
|
912
|
iv_picon = (ImageView) v.findViewById(R.id.iv_picon);
|
|
913
|
certified_icon = (ImageView) v.findViewById(R.id.certified_icon);
|
|
914
|
high_grade_comment_icon = (ImageView) v.findViewById(R.id.high_grade_comment_icon);
|
|
915
|
iv_pgrade = (ImageView) v.findViewById(R.id.iv_pgrade);
|
|
916
|
iv_commentPic = (ImageView) v.findViewById(R.id.iv_commentPic);
|
|
917
|
imgTwo = (ImageView) v.findViewById(R.id.imgTwo);
|
|
918
|
imgThree = (ImageView) v.findViewById(R.id.imgThree);
|
|
919
|
imgStart = (ImageView) v.findViewById(R.id.imgStart);
|
|
920
|
imgVideo = (ImageView) v.findViewById(R.id.imgVideo);
|
|
921
|
iv_level_img = (ImageView) v.findViewById(R.id.iv_level_img);
|
|
922
|
iv_pzan = (ImageView) v.findViewById(R.id.iv_pzan);
|
|
923
|
ll_pzan = (LinearLayout) v.findViewById(R.id.ll_pzan);
|
|
924
|
fl_ptag = (TagFlowLayout) v.findViewById(R.id.fl_ptag);
|
|
925
|
parent = (RelativeLayout) v.findViewById(R.id.parent);
|
|
926
|
imgLayout = (RelativeLayout) v.findViewById(R.id.imgLayout);
|
948
|
927
|
}
|
949
|
928
|
|
950
|
929
|
@Override
|
|
@ -1263,40 +1242,256 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
|
1263
|
1242
|
|
1264
|
1243
|
@Subscribe
|
1265
|
1244
|
public void eteCityTime(RankinglistRefreshEvent rankinglistRefreshEvent) {
|
|
1245
|
String url = MainApplication.url + "/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
|
|
1246
|
OkHttpUtils.get().url(url).build().execute(new StringCallback() {
|
|
1247
|
@Override
|
|
1248
|
public void onError(Call call, Exception e) {
|
|
1249
|
|
|
1250
|
}
|
1266
|
1251
|
|
1267
|
|
new Thread(new Runnable() {
|
1268
|
1252
|
@Override
|
1269
|
|
public void run() {
|
1270
|
|
try {
|
1271
|
|
long appTime4 = System.currentTimeMillis() / 1000;
|
1272
|
|
long updatetime4 = appTime4 - MainMapActivity.cha - 1;
|
1273
|
|
String token4 = String.valueOf(updatetime4);
|
1274
|
|
String url = "{\"fun\":\"getcomment\",\"zhan_id\":" + "\"" + NewZhanDetailsActivity.zhan_id + "\"" + ",\"timer\":" + "\"" + URLEncoder.encode(DES3.encode(token4)) + "\"" + "}";
|
1275
|
|
// Log.e("url===", url);
|
1276
|
|
// 创建Socket
|
1277
|
|
// socket = new Socket("192.168.1.110",54321);
|
1278
|
|
socket = new Socket("cdz.evcharge.cc", 9503); // IP:10.14.114.127,端口54321
|
1279
|
|
// 向服务器发送消息
|
1280
|
|
PrintWriter out = new PrintWriter(new BufferedWriter(
|
1281
|
|
new OutputStreamWriter(socket.getOutputStream())), true);
|
1282
|
|
out.println(url);
|
1283
|
|
// out.println("{\"fun\":\"getcity\"}");
|
1284
|
|
// 接收来自服务器的消息
|
1285
|
|
BufferedReader br = new BufferedReader(new InputStreamReader(
|
1286
|
|
socket.getInputStream()));
|
1287
|
|
String msg = br.readLine();
|
1288
|
|
// Log.e("===",msg);
|
1289
|
|
if (msg != null) {
|
1290
|
|
Message mes = new Message();
|
1291
|
|
mes.obj = msg;
|
1292
|
|
mes.what = 6;
|
1293
|
|
handler.sendMessage(mes);
|
1294
|
|
}
|
|
1253
|
public void onResponse(String response) {
|
|
1254
|
String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
|
|
1255
|
if (null != rtnCode && rtnCode.equals("01")) {
|
|
1256
|
try {
|
|
1257
|
JSONObject responseJson = new JSONObject(response);
|
|
1258
|
String commentData = responseJson.getString("data");
|
|
1259
|
JSONArray jsonArray = new JSONArray(commentData);
|
|
1260
|
ArrayList<JSONObject> datasJson = new ArrayList<JSONObject>();
|
|
1261
|
for (int j = 0; j < jsonArray.length(); j++) {
|
|
1262
|
JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
|
|
1263
|
String is_play = TextUtils.isEmpty(jsonObject.getString("is_play")) ? "" : jsonObject.getString("is_play"); //0 审核未通过 item隐藏,1 审核通过,item显示
|
|
1264
|
String type = TextUtils.isEmpty(jsonObject.getString("type")) ? "" : jsonObject.getString("type"); //23 视频,24 图片
|
|
1265
|
if (type.equals("23")) {
|
|
1266
|
if (is_play.equals("1")) {
|
|
1267
|
datasJson.add(jsonObject);
|
|
1268
|
}
|
|
1269
|
} else {
|
|
1270
|
datasJson.add(jsonObject);
|
|
1271
|
}
|
|
1272
|
}
|
|
1273
|
if(datasJson.size()>0){
|
|
1274
|
rl_new_comment.setVisibility(View.VISIBLE);
|
|
1275
|
|
|
1276
|
JSONObject jsonObject = datasJson.get(0);
|
|
1277
|
String title = jsonObject.optString("title");
|
|
1278
|
String name = jsonObject.optString("nickname");
|
|
1279
|
String tel = jsonObject.optString("tel");
|
|
1280
|
String content = jsonObject.optString("content");
|
|
1281
|
String theme= jsonObject.optString("theme");
|
|
1282
|
String addtime =jsonObject.optString("addtime");
|
|
1283
|
String chexing = jsonObject.optString("hascar");
|
|
1284
|
int isCertifiedOwner =jsonObject.optInt("is_certified_owner");
|
|
1285
|
final String pic_url = MainApplication.url + "/zhannew/uploadfile/" + jsonObject.optString("userpic");
|
|
1286
|
String fine = jsonObject.optString("fine");
|
|
1287
|
|
|
1288
|
if (title.equals("")) {
|
|
1289
|
iv_level_img.setVisibility(View.GONE);
|
|
1290
|
} else if (title.equals("V0")) {
|
|
1291
|
iv_level_img.setVisibility(View.GONE);
|
|
1292
|
} else if (title.equals("V1")) {
|
|
1293
|
iv_level_img.setVisibility(View.VISIBLE);
|
|
1294
|
iv_level_img.setImageResource(R.drawable.icon_qingtong);
|
|
1295
|
} else if (title.equals("V2")) {
|
|
1296
|
iv_level_img.setVisibility(View.VISIBLE);
|
|
1297
|
iv_level_img.setImageResource(R.drawable.icon_baiyin);
|
|
1298
|
} else if (title.equals("V3")) {
|
|
1299
|
iv_level_img.setVisibility(View.VISIBLE);
|
|
1300
|
iv_level_img.setImageResource(R.drawable.icon_huangjin);
|
|
1301
|
} else if (title.equals("V4")) {
|
|
1302
|
iv_level_img.setVisibility(View.VISIBLE);
|
|
1303
|
iv_level_img.setImageResource(R.drawable.icon_bojin);
|
|
1304
|
} else if (title.equals("V5")) {
|
|
1305
|
iv_level_img.setVisibility(View.VISIBLE);
|
|
1306
|
iv_level_img.setImageResource(R.drawable.icon_zuanshi);
|
|
1307
|
}
|
1295
|
1308
|
|
1296
|
|
} catch (Exception e) {
|
|
1309
|
|
|
1310
|
if (!TextUtils.isEmpty(theme.trim())){
|
|
1311
|
content= "#"+theme+"#"+content;
|
|
1312
|
}
|
|
1313
|
if (content.equals("") || content.equals(" ")) {
|
|
1314
|
tv_pcontext.setVisibility(View.GONE);
|
|
1315
|
} else {
|
|
1316
|
tv_pcontext.setVisibility(View.VISIBLE);
|
|
1317
|
SpannableString ss = new SpannableString(content);
|
|
1318
|
Pattern pattern = Pattern.compile("#[0-9a-zA-Z,\\u4e00-\\u9fa5]+#");
|
|
1319
|
Matcher matcher = pattern.matcher(ss);
|
|
1320
|
while (matcher.find()) {
|
|
1321
|
int start = matcher.start();
|
|
1322
|
int end = matcher.end();
|
|
1323
|
ss.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.topic_green)), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
|
1324
|
|
|
1325
|
}
|
|
1326
|
tv_pcontext.setText(ss);
|
|
1327
|
}
|
|
1328
|
|
|
1329
|
//父级头像
|
|
1330
|
iv_picon.setImageResource(R.drawable.icon_user1118);
|
|
1331
|
|
|
1332
|
Picasso.with(getActivity())
|
|
1333
|
.load(pic_url)
|
|
1334
|
.error(R.drawable.icon_user1118)
|
|
1335
|
.placeholder(R.drawable.icon_user1118)
|
|
1336
|
.transform(new CircleTransform())
|
|
1337
|
.into(iv_picon);
|
|
1338
|
//父级显示名称
|
|
1339
|
if (!name.equals("") && !name.equals("null")) {
|
|
1340
|
tv_pname.setText(name);
|
|
1341
|
} else {
|
|
1342
|
tv_pname.setText(Util.handlePhoneComment(tel));
|
|
1343
|
}
|
|
1344
|
//父级评论时间
|
|
1345
|
tv_ptime.setText(TimeStamp2Date(addtime, "yyyy-MM-dd"));
|
|
1346
|
//父级评论人车型
|
|
1347
|
|
|
1348
|
tv_pcar.setText(CarTypeUtil.getCarType(chexing));
|
|
1349
|
if (isCertifiedOwner == 1) {
|
|
1350
|
certified_icon.setVisibility(View.VISIBLE);
|
|
1351
|
} else {
|
|
1352
|
certified_icon.setVisibility(View.GONE);
|
|
1353
|
}
|
|
1354
|
|
|
1355
|
|
|
1356
|
if ("1".equals(fine)) {
|
|
1357
|
high_grade_comment_icon.setVisibility(View.VISIBLE);
|
|
1358
|
} else {
|
|
1359
|
high_grade_comment_icon.setVisibility(View.GONE);
|
|
1360
|
}
|
|
1361
|
|
|
1362
|
String tag =jsonObject.optString("tag");
|
|
1363
|
if (tag.equals("")) {
|
|
1364
|
fl_ptag.setVisibility(View.GONE);
|
|
1365
|
} else {
|
|
1366
|
fl_ptag.setVisibility(View.VISIBLE);
|
|
1367
|
stringArr = tag.split(",");
|
|
1368
|
fl_ptag.setClickable(false);
|
|
1369
|
fl_ptag.setEnabled(false);
|
|
1370
|
fl_ptag.setAdapter(new TagAdapter<String>(stringArr) {
|
|
1371
|
@Override
|
|
1372
|
public View getView(FlowLayout parent, int position, String s) {
|
|
1373
|
TextView tv = (TextView) LayoutInflater.from(getContext()).inflate(R.layout.tv_comment, fl_ptag, false);
|
|
1374
|
tv.setText(s);
|
|
1375
|
return tv;
|
|
1376
|
}
|
|
1377
|
});
|
|
1378
|
}
|
|
1379
|
//父级点赞
|
|
1380
|
String agree_num = jsonObject.optString("agree_num");
|
|
1381
|
if (agree_num.equals("0")) {
|
|
1382
|
tv_pzan.setText("赞");
|
|
1383
|
} else {
|
|
1384
|
tv_pzan.setText(agree_num);
|
|
1385
|
}
|
|
1386
|
|
|
1387
|
String type = TextUtils.isEmpty(jsonObject.optString("type"))?"":jsonObject.optString("type"); //23 视频,24 图片
|
|
1388
|
|
|
1389
|
|
|
1390
|
//父级评论图片
|
|
1391
|
String fileUrl = jsonObject.optString("fileUrl");
|
|
1392
|
String file2Url = jsonObject.optString("file2Url");
|
|
1393
|
String file3Url = jsonObject.optString("file3Url");
|
|
1394
|
if (type.equals("23")){
|
|
1395
|
imgVideo.setVisibility(View.VISIBLE);
|
|
1396
|
imgStart.setVisibility(View.VISIBLE);
|
|
1397
|
imgLayout.setVisibility(View.VISIBLE);
|
|
1398
|
|
|
1399
|
iv_commentPic.setVisibility(View.GONE);
|
|
1400
|
imgTwo.setVisibility(View.GONE);
|
|
1401
|
imgThree.setVisibility(View.GONE);
|
|
1402
|
|
|
1403
|
String thumUrl = jsonObject.optString("thumUrl");
|
|
1404
|
if (!TextUtils.isEmpty(thumUrl) && !TextUtils.isEmpty(fileUrl)){
|
|
1405
|
Glide.with(MainApplication.context)
|
|
1406
|
.load(MainApplication.CDN +thumUrl)
|
|
1407
|
.into(imgVideo);
|
|
1408
|
}
|
|
1409
|
|
|
1410
|
}else {
|
|
1411
|
|
|
1412
|
imgVideo.setVisibility(View.GONE);
|
|
1413
|
imgStart.setVisibility(View.GONE);
|
|
1414
|
|
|
1415
|
if (!fileUrl.equals("")) {
|
|
1416
|
iv_commentPic.setVisibility(View.VISIBLE);
|
|
1417
|
imgLayout.setVisibility(View.VISIBLE);
|
|
1418
|
|
|
1419
|
Picasso.with(MainApplication.context)
|
|
1420
|
.load(MainApplication.url + "/zhannew/uploadfile/"+fileUrl)
|
|
1421
|
.into(iv_commentPic);
|
|
1422
|
|
|
1423
|
} else {
|
|
1424
|
iv_commentPic.setVisibility(View.GONE);
|
|
1425
|
imgLayout.setVisibility(View.GONE);
|
|
1426
|
}
|
|
1427
|
if (!file2Url.equals("")) {
|
|
1428
|
imgTwo.setVisibility(View.VISIBLE);
|
|
1429
|
Picasso.with(MainApplication.context)
|
|
1430
|
.load(MainApplication.url + "/zhannew/uploadfile/"+file2Url)
|
|
1431
|
.into(imgTwo);
|
|
1432
|
} else {
|
|
1433
|
imgTwo.setVisibility(View.GONE);
|
|
1434
|
}
|
|
1435
|
if (!file3Url.equals("")) {
|
|
1436
|
imgThree.setVisibility(View.VISIBLE);
|
|
1437
|
Picasso.with(MainApplication.context)
|
|
1438
|
.load(MainApplication.url + "/zhannew/uploadfile/"+file3Url)
|
|
1439
|
.into(imgThree);
|
|
1440
|
} else {
|
|
1441
|
imgThree.setVisibility(View.GONE);
|
|
1442
|
}
|
|
1443
|
}
|
|
1444
|
//父级评分
|
|
1445
|
String grade = jsonObject.optString("star_level");
|
|
1446
|
if (grade.equals("")) {
|
|
1447
|
iv_pgrade.setVisibility(View.GONE);
|
|
1448
|
} else {
|
|
1449
|
double d = Double.parseDouble(grade);
|
|
1450
|
if (d == 0) {
|
|
1451
|
iv_pgrade.setVisibility(View.GONE);
|
|
1452
|
} else {
|
|
1453
|
if (d > 0 && d < 1) {
|
|
1454
|
iv_pgrade.setImageResource(R.drawable.icon_05xing);
|
|
1455
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1456
|
} else if (d >= 1 && d < 1.5) {
|
|
1457
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1458
|
iv_pgrade.setImageResource(R.drawable.icon_1xing);
|
|
1459
|
} else if (d >= 1.5 && d < 2) {
|
|
1460
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1461
|
iv_pgrade.setImageResource(R.drawable.icon_15xing);
|
|
1462
|
} else if (d >= 2 && d < 2.5) {
|
|
1463
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1464
|
iv_pgrade.setImageResource(R.drawable.icon_2xing);
|
|
1465
|
} else if (d >= 2.5 && d < 3) {
|
|
1466
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1467
|
iv_pgrade.setImageResource(R.drawable.icon_25xing);
|
|
1468
|
} else if (d >= 3 && d < 3.5) {
|
|
1469
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1470
|
iv_pgrade.setImageResource(R.drawable.icon_3xing);
|
|
1471
|
} else if (d >= 3.5 && d < 4) {
|
|
1472
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1473
|
iv_pgrade.setImageResource(R.drawable.icon_35xing);
|
|
1474
|
} else if (d >= 4 && d < 4.5) {
|
|
1475
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1476
|
iv_pgrade.setImageResource(R.drawable.icon_4xing);
|
|
1477
|
} else if (d >= 4.5 && d < 5) {
|
|
1478
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1479
|
iv_pgrade.setImageResource(R.drawable.icon_45xing);
|
|
1480
|
} else {
|
|
1481
|
iv_pgrade.setVisibility(View.VISIBLE);
|
|
1482
|
iv_pgrade.setImageResource(R.drawable.icon_5xing);
|
|
1483
|
}
|
|
1484
|
}
|
|
1485
|
}
|
|
1486
|
}else{
|
|
1487
|
rl_new_comment.setVisibility(View.GONE);
|
|
1488
|
}
|
|
1489
|
} catch (Exception e) {
|
|
1490
|
|
|
1491
|
}
|
1297
|
1492
|
}
|
1298
|
1493
|
}
|
1299
|
|
}).start();
|
|
1494
|
});
|
1300
|
1495
|
}
|
1301
|
1496
|
|
1302
|
1497
|
@Override
|