c661c2a4d413b0244fL664">664
//                        Log.i("appTime(long)---", appTime1+"");
665
//                        cha = appTime1 - phpTime;
666
667
//                    SharedPreferences mySharedPreferences= MainFragment.getSharedPreferences("userName",
668
//                            Activity.MODE_PRIVATE);
669
//                    SharedPreferences.Editor editor = mySharedPreferences.edit();
670
//                    editor.putInt("cha", cha);
671
//                    editor.commit();
672
//                        Log.d("cha(long)---", cha + "");
673
674
675 651
                        try {
676 652
                            String date = JsonUtils.getKeyResult(msg.obj.toString(), "data");
677 653
//                            Log.e("data", date);
@ -933,6 +909,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
933 909
        }
934 910
935 911
        showPostDelayedDialog();
912
        getSwitch();
936 913
//        ConfirmOrderActivity.actionStart(this);
937 914
//        startActivity(new Intent(getApplication(), ChargingStatusActivity.class));
938 915
//        startActivity(new Intent(this, SkipUserInfoActivity.class));
@ -1033,6 +1010,9 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1033 1010
        windowComments = (RelativeLayout) findViewById(R.id.window_rl_comment);
1034 1011
1035 1012
        windowAd = (ImageView) findViewById(R.id.window_iv_ad);
1013
        imgActivityCenter = (ImageView) findViewById(R.id.imgActivityCenter);
1014
1015
1036 1016
        windowGradeImg = (ImageView) findViewById(R.id.window_iv_zhan_grade);
1037 1017
        iv_tuijian_close = (ImageView) findViewById(R.id.iv_tuijian_close);
1038 1018
        iv_tuijian_tip_close = (ImageView) findViewById(R.id.iv_tuijian_tip_close);
@ -1129,6 +1109,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1129 1109
        tv_sortStarLevel = (TextView) findViewById(R.id.tv_sortStarLevel);
1130 1110
        tv_sortStarLevel.setOnClickListener(this);
1131 1111
        tv_sortFreeTime = (TextView) findViewById(R.id.tv_sortFreeTime);
1112
        notificationText = (TextView) findViewById(R.id.notificationText);
1132 1113
        tv_sortFreeTime.setOnClickListener(this);
1133 1114
        rl_mapList = (RelativeLayout) findViewById(R.id.rl_mapList);
1134 1115
        iv_roadCondition = (ImageView) findViewById(R.id.iv_roadCondition);
@ -1186,7 +1167,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1186 1167
////            clickMarker = false;
1187 1168
//            firstOpen = false;
1188 1169
//        }
1189
//        getMessage();
1190 1170
1191 1171
        inBtn = (ImageView) findViewById(R.id.zoomin);
1192 1172
        inBtn.setOnClickListener(this);
@ -1411,6 +1391,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1411 1391
        if (hasLocationPermission() && center == null && mlocationClient!=null) {
1412 1392
            mlocationClient.startLocation();
1413 1393
        }
1394
        getMessage();
1414 1395
    }
1415 1396
1416 1397
    private void searchAll() {
@ -3645,68 +3626,56 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
3645 3626
3646 3627
    //获取系统消息
3647 3628
    private void getMessage() {
3648
        new Thread(new Runnable() {
3649
            @Override
3650
            public void run() {
3651
                long appTime1 = System.currentTimeMillis() / 1000;
3652
//                Log.i("appTime(long)---", appTime1 + "");
3653
                String token = String.valueOf(appTime1);
3654
//                Log.e("token", token);
3655
                String url = null;
3656
                if (MainApplication.msgTime.equals("0")) {
3657
                    MainApplication.firstOpenTime = token;
3658
                    ProfileManager.getInstance().setFirstOpenTime(getApplicationContext(), token);
3659
                    MainApplication.msgTime = token;
3660
                    ProfileManager.getInstance().setSystemMsgTime(getApplicationContext(), token);
3661
                }
3662
                try {
3663
                    url = MainApplication.url + "/zhannew/basic/web/index.php/zhangonggao/release?timer=" + MainApplication.msgTime;
3664
//                    Log.e("890", url);
3665
                } catch (Exception e) {
3666
                    e.printStackTrace();
3667
                }
3668
                submitMessage(url);
3669
            }
3670
        }).start();
3671
    }
3629
        long appTime1 = System.currentTimeMillis() / 1000;
3630
        String token = String.valueOf(appTime1);
3672 3631
3673
    private void submitMessage(String sms) {
3632
        if (MainApplication.msgTime.equals("0")) {
3633
            MainApplication.firstOpenTime = token;
3634
            ProfileManager.getInstance().setFirstOpenTime(getApplicationContext(), token);
3635
            MainApplication.msgTime = token;
3636
            ProfileManager.getInstance().setSystemMsgTime(getApplicationContext(), token);
3637
        }
3638
        String url = MainApplication.url + "/zhannew/basic/web/index.php/zhangonggao/release2?timer=" + MainApplication.msgTime;
3639
//        Log.e(TAG, "onResponse hc url: "+url);
3640
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
3641
            @Override
3642
            public void onError(Call call, Exception e) {
3674 3643
3675
//        Log.e("url", sms);
3676
        Request request = new Request.Builder().url(sms).build();
3677
        Response response = null;
3678
        try {
3679
            if (request == null) {
3680
                Message msg = new Message();
3681
                msg.what = 5;
3682
                hand.sendMessage(msg);
3683
                return;
3684 3644
            }
3685
            response = OkHttpUtil.execute(request);
3686
            if (response.code() == 200) {
3687
                String json = "";
3645
3646
            @Override
3647
            public void onResponse(String response) {
3688 3648
                try {
3689
                    json = response.body().string();
3690
                    Message msg = new Message();
3691
                    msg.obj = json;
3692
                    msg.what = 7;
3693
                    hand.sendMessage(msg);
3694
//                    Log.e("url", json);
3695
                } catch (Exception e) {
3649
                    JSONArray jsonArray=new JSONArray(response);
3650
                    if (jsonArray.length()>0){
3651
                        JSONObject jsonObject = (JSONObject) jsonArray.get(0);
3652
                        String content = jsonObject.optString("content");
3653
                        String url = jsonObject.optString("url");
3654
                        if (rl_charging_notice.getVisibility() != View.VISIBLE){
3655
                            notificationText.setText(content);
3656
                            rl_charging_notice.setOnClickListener(view -> {
3657
                                if (!TextUtils.isEmpty(url)){
3658
                                    Uri.Builder builder = Uri.parse(url).buildUpon();
3659
                                    builder.appendQueryParameter("user_id", MainApplication.userId);
3660
                                    builder.appendQueryParameter("tel", MainApplication.userPhone);
3661
                                    builder.appendQueryParameter("token", MainApplication.userId);
3662
                                    LogUtils.e(builder.toString());
3663
                                    Intent intent = new Intent(getApplicationContext(), MyWebViewActivity.class);
3664
                                    intent.putExtra("url", url);
3665
                                    startActivity(intent);
3666
                                }
3667
                            });
3668
                            rl_charging_notice.setVisibility(View.VISIBLE);
3669
                        }
3670
                    }
3671
                } catch (JSONException e) {
3696 3672
                    e.printStackTrace();
3697
                    Message msg = new Message();
3698
                    msg.what = 5;
3699
                    hand.sendMessage(msg);
3700 3673
                }
3701 3674
            }
3702
        } catch (Exception e) {
3703
            e.printStackTrace();
3704
            Message msg = new Message();
3705
            msg.what = 5;
3706
            hand.sendMessage(msg);
3707
        }
3675
        });
3708 3676
    }
3709 3677
3678
3710 3679
    public void MainMapp() {
3711 3680
        eteCityTime("{\"fun\":\"timer\"}");
3712 3681
        clickMarker = false;
@ -3817,6 +3786,45 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
3817 3786
3818 3787
    }
3819 3788
3789
    /**
3790
     * 是否展示 活动中心
3791
     * */
3792
    private void getSwitch(){
3793
        String url =MainApplication.url+"/zhannew/basic/web/index.php/zhangonggao/switch";
3794
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
3795
            @Override
3796
            public void onError(Call call, Exception e) {
3797
3798
            }
3799
3800
            @Override
3801
            public void onResponse(String response) {
3802
                String rtnCode = JsonUtils.getKeyResult(response, "code");
3803
                if (!TextUtils.isEmpty(rtnCode) && rtnCode.equals("100")) {
3804
                    String data = JsonUtils.getKeyResult(response, "data");
3805
                    String url = JsonUtils.getKeyResult(response, "url")==null ?"":JsonUtils.getKeyResult(response, "url");
3806
3807
                    if (!TextUtils.isEmpty(data) && data.equals("1")){
3808
                        imgActivityCenter.setVisibility(View.VISIBLE);
3809
                        imgActivityCenter.setOnClickListener(v->{
3810
                            Uri.Builder builder = Uri.parse(url).buildUpon();
3811
                            builder.appendQueryParameter("user_id", MainApplication.userId);
3812
                            builder.appendQueryParameter("tel", MainApplication.userPhone);
3813
                            builder.appendQueryParameter("token", MainApplication.userId);
3814
                            LogUtils.e(builder.toString());
3815
                            Intent intent = new Intent(getApplicationContext(), MyWebViewActivity.class);
3816
                            intent.putExtra("url", url);
3817
                            startActivity(intent);
3818
                        });
3819
                    }else{
3820
                        imgActivityCenter.setVisibility(View.GONE);
3821
                    }
3822
                }
3823
            }
3824
        });
3825
3826
    }
3827
3820 3828
    //登陆状态判断
3821 3829
    private void setlogin() {
3822 3830
        if (TextUtils
@ -3952,6 +3960,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
3952 3960
                    String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
3953 3961
                    if ("306".equals(rtnCode)) {
3954 3962
                        LogUtils.e("有订单");
3963
                        notificationText.setText("您有一笔订单正在进行中,点击查看详情...");
3955 3964
                        rl_charging_notice.setVisibility(View.VISIBLE);
3956 3965
                        if (firstCheck) {
3957 3966
                            if (isStatusBack == false) {

+ 10 - 1
app/src/main/java/com/electric/chargingpile/activity/SearchActivity.java

@ -79,7 +79,7 @@ public class SearchActivity extends Activity implements OnClickListener, Inputti
79 79
    private TextView tvSearch;
80 80
    private Toast toast = null;
81 81
    private EditText etSearch;
82
    private ImageView ivClear;
82
    private ImageView ivClear,imgNoData;
83 83
    private ListView lvContent;
84 84
    private SearchAdapter adapter;
85 85
    private List<Map<String, String>> addressList = new ArrayList<Map<String, String>>();
@ -132,6 +132,7 @@ public class SearchActivity extends Activity implements OnClickListener, Inputti
132 132
        ivClear = (ImageView) findViewById(R.id.iv_search_clear);
133 133
        ivClear.setOnClickListener(this);
134 134
        no_result = findViewById(R.id.no_result);
135
        imgNoData = findViewById(R.id.imgNoData);
135 136

136 137
        etSearch = (EditText) findViewById(R.id.et_search);
137 138
        etSearch.setOnClickListener(new OnClickListener() {
@ -214,6 +215,7 @@ public class SearchActivity extends Activity implements OnClickListener, Inputti
214 215
                        lvContent.setVisibility(View.GONE);
215 216
                    } else {
216 217
                        no_result.setVisibility(View.GONE);
218
                        imgNoData.setVisibility(View.GONE);
217 219
                        keyWord = s;
218 220
                        doSearchQuery();
219 221
                        doPointNameSearchQuery();
@ -488,8 +490,10 @@ public class SearchActivity extends Activity implements OnClickListener, Inputti
488 490

489 491
                            if (addressList.size() == 0 && pointList.size() == 0) {
490 492
                                no_result.setVisibility(View.VISIBLE);
493
                                imgNoData.setVisibility(View.VISIBLE);
491 494
                            } else {
492 495
                                no_result.setVisibility(View.GONE);
496
                                imgNoData.setVisibility(View.GONE);
493 497
                            }
494 498

495 499
                        } catch (Exception e) {
@ -503,9 +507,12 @@ public class SearchActivity extends Activity implements OnClickListener, Inputti
503 507

504 508
                        if (addressList.size() == 0 && pointList.size() == 0) {
505 509
                            no_result.setVisibility(View.VISIBLE);
510
                            imgNoData.setVisibility(View.VISIBLE);
506 511
                        } else {
507 512
                            no_result.setVisibility(View.GONE);
513
                            imgNoData.setVisibility(View.GONE);
508 514
                        }
515

509 516
                    }
510 517
                }
511 518
            } else {
@ -1020,8 +1027,10 @@ public class SearchActivity extends Activity implements OnClickListener, Inputti
1020 1027

1021 1028
                if (addressList.size() == 0 && pointList.size() == 0) {
1022 1029
                    no_result.setVisibility(View.VISIBLE);
1030
                    imgNoData.setVisibility(View.VISIBLE);
1023 1031
                } else {
1024 1032
                    no_result.setVisibility(View.GONE);
1033
                    imgNoData.setVisibility(View.GONE);
1025 1034
                }
1026 1035
            }
1027 1036
        });

+ 4 - 46
app/src/main/java/com/electric/chargingpile/activity/UserCenterActivity.java

@ -664,7 +664,7 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
664 664
                    MobclickAgent.onEvent(getApplicationContext(), "1093");
665 665
//                    startActivity(new Intent(getApplicationContext(), PersonalPageActivity.class));
666 666
//                    startActivity(new Intent(getApplicationContext(), UserInfoActivity.class));
667
                    startActivity(new Intent(getApplicationContext(), UserPageActivity.class));
667
//                    startActivity(new Intent(getApplicationContext(), UserPageActivity.class));
668 668
                }
669 669
            });
670 670
            ll_userLogin.setVisibility(View.INVISIBLE);
@ -1609,53 +1609,11 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
1609 1609
                    String log_day = JsonUtils.getKeyResult(rtnMsg, "log_day");
1610 1610
                    String score = JsonUtils.getKeyResult(rtnMsg, "plusScore");
1611 1611
1612
                    String third = "", second = "", first = "";
1613
1614
                    int length = log_day.length();
1615
1616
                    char words[] = log_day.toCharArray();
1617
                    if (length == 1) {
1618
                        third = "";
1619
                        second = "";
1620
                        first = String.valueOf(words[0]);
1621
                    } else if (length == 2) {
1622
                        third = "";
1623
                        second = String.valueOf(words[0]);
1624
                        first = String.valueOf(words[1]);
1625
                    } else if (length == 3) {
1626
                        third = String.valueOf(words[0]);
1627
                        second = String.valueOf(words[1]);
1628
                        first = String.valueOf(words[2]);
1629
                    }
1630
1631 1612
1632
//                    String weather = JsonUtils.getKeyResult(rtnMsg,"weather");
1633
////                    Log.e(TAG, "onResponse: weather="+weather );
1634
//                    String status = JsonUtils.getKeyResult(weather,"status");
1635
////                    Log.e(TAG, "onResponse: status="+status );
1636
//                    String results = JsonUtils.getKeyResult(weather,"results");
1637
////                    Log.e(TAG, "onResponse: results="+results );
1638
//                    try {
1639
//                        JSONArray jsArray = new JSONArray(results);
1640
////                        if (jsArray.length() >1) {
1641
//                            String s = jsArray.getString(0);
1642
//                            Log.e(TAG, "onResponse: s=" + s);
1643
//                            String pm25 = JsonUtils.getKeyResult(s, "pm25");//*
1644
//                            Log.e(TAG, "onResponse: pm25=" + pm25);
1645
//                            String weather_data = JsonUtils.getKeyResult(s, "weather_data");
1646
//                            Log.e(TAG, "onResponse: weather_data=" + weather_data);
1647
//                            List<WeatherResults.WeatherDataBean> list = JsonUtils.parseToObjectList(weather_data, WeatherResults.WeatherDataBean.class);
1648
//                            String now_weather = list.get(0).getWeather();//*
1649
//                            String temperature = list.get(0).getTemperature();//*
1650
//                            temperature = temperature.replace(" ", "");
1651
//                            temperature = temperature.substring(0, temperature.length() - 1);
1652
//                            String date = list.get(0).getDate();
1653
//                            String now_temperature = date.substring(date.length() - 4, date.length() - 2);//*
1654
//                            Log.e(TAG, "onResponse: now_weather=" + now_weather + "--temperature=" + temperature + "--now_temperature=" + now_temperature);
1655 1613
                    if (activity == null || activity.isFinishing()) {
1656 1614
                        return;
1657 1615
                    } else {
1658
                        showDialog(third, second, first, score, now_temperature, now_weather, temperature, MainMapActivity.location_city);
1616
                        showDialog(log_day, score, now_temperature, now_weather, temperature, MainMapActivity.location_city);
1659 1617
                    }
1660 1618
1661 1619
@ -1687,11 +1645,11 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
1687 1645
1688 1646
    }
1689 1647
1690
    private void showDialog(String third, String second, String first, String score, String now_temperature, String now_weather, String temperature, String city) {
1648
    private void showDialog(String log_day, String score, String now_temperature, String now_weather, String temperature, String city) {
1691 1649
        SignInDialog signInDialog = new SignInDialog(this);
1692 1650
        signInDialog.builder()
1693 1651
                .setCancelable(true)
1694
                .setTitle(third, second, first, score, city)
1652
                .setTitle(log_day, score, city)
1695 1653
                .setWeatherUI(now_temperature, now_weather, temperature)
1696 1654
                .show();
1697 1655
    }

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

@ -267,7 +267,18 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
267 267
268 268
            @Override
269 269
            public void afterTextChanged(Editable s) {
270
                if (et_pinglun.getText().toString().equals("") && NewZhanDetailsActivity.replaceBlank(et_pinglun.getText().toString()).equals("")) {
270
271
272
                String s1 = et_pinglun.getText().toString();
273
                s1= s1.replace(" " ,"");
274
                if (s1.length() >= 5){
275
                    tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
276
                    tv_make_sure.setEnabled(true);
277
                }else{
278
                    tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
279
                    tv_make_sure.setEnabled(false);
280
                }
281
               /* if (s1.equals("") && NewZhanDetailsActivity.replaceBlank(s1).equals("")) {
271 282
                    if (!star_level.equals("") && !select_s.equals("")) {
272 283
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
273 284
                        tv_make_sure.setEnabled(true);
@ -276,8 +287,8 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
276 287
                        tv_make_sure.setEnabled(false);
277 288
                    }
278 289
                } else {
279
                    Log.e("edit===", et_pinglun.getText().toString());
280
                    if (et_pinglun.getText().toString().equals("#" + MainApplication.huodonglabel + "# ")) {
290
                    Log.e("edit===", s1);
291
                    if (s1.equals("#" + MainApplication.huodonglabel + "# ")) {
281 292
                        if (!star_level.equals("") && !select_s.equals("")) {
282 293
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
283 294
                            tv_make_sure.setEnabled(true);
@ -290,8 +301,8 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
290 301
                        tv_make_sure.setEnabled(true);
291 302
                    }
292 303
293
                }
294
                if (!et_pinglun.getText().toString().contains("#" + MainApplication.huodonglabel + "#")) {
304
                }*/
305
                if (!s1.contains("#" + MainApplication.huodonglabel + "#")) {
295 306
                    final LayoutInflater mInflater = LayoutInflater.from(getApplicationContext());
296 307
                    mFlowLayoutTwo.setAdapter(new TagAdapter<String>(mValss) {
297 308
                        @Override
@ -317,29 +328,7 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
317 328
                star_level = String.valueOf(RatingScore);
318 329
                mFlowLayout.setVisibility(View.VISIBLE);
319 330
                select_s = "";
320
                if (et_pinglun.getText().toString().equals("") && NewZhanDetailsActivity.replaceBlank(et_pinglun.getText().toString()).equals("")) {
321
                    if (!star_level.equals("") && !select_s.equals("")) {
322
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
323
                        tv_make_sure.setEnabled(true);
324
                    } else {
325
                        tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
326
                        tv_make_sure.setEnabled(false);
327
                    }
328
                } else {
329
                    if (et_pinglun.getText().toString().equals("#" + MainApplication.huodonglabel + "# ")) {
330
                        if (!star_level.equals("") && !select_s.equals("")) {
331
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
332
                            tv_make_sure.setEnabled(true);
333
                        } else {
334
                            tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
335
                            tv_make_sure.setEnabled(false);
336
                        }
337
                    } else {
338
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
339
                        tv_make_sure.setEnabled(true);
340
                    }
341 331
342
                }
343 332
                switch (RatingScore) {
344 333
                    case 1:
345 334
                        if (!MainApplication.level_one.equals("")) {
@ -413,31 +402,7 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
413 402
                    select_ss = MainApplication.huodonglabel;
414 403
                    setTopic();
415 404
                }
416
                if (et_pinglun.getText().toString().equals("") && NewZhanDetailsActivity.replaceBlank(et_pinglun.getText().toString()).equals("")) {
417
                    if (!star_level.equals("") && !select_s.equals("")) {
418
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
419
                        tv_make_sure.setEnabled(true);
420
                    } else {
421
                        tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
422
                        tv_make_sure.setEnabled(false);
423
                    }
424
                } else {
425
                    if (et_pinglun.getText().toString().equals("#" + MainApplication.huodonglabel + "# ")) {
426
//                        tv_make_sure.setBackgroundResource(R.color.huise);
427
//                        tv_make_sure.setEnabled(false);
428
                        if (!star_level.equals("") && !select_s.equals("")) {
429
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
430
                            tv_make_sure.setEnabled(true);
431
                        } else {
432
                            tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
433
                            tv_make_sure.setEnabled(false);
434
                        }
435
                    } else {
436
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
437
                        tv_make_sure.setEnabled(true);
438
                    }
439 405
440
                }
441 406
//                Toast.makeText(getApplicationContext(), mVals[position], Toast.LENGTH_SHORT).show();
442 407
                return true;
443 408
            }
@ -646,29 +611,6 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
646 611
                }
647 612
                Log.e("select===", select_s);
648 613
649
650
                if (et_pinglun.getText().toString().equals("") && NewZhanDetailsActivity.replaceBlank(et_pinglun.getText().toString()).equals("")) {
651
                    if (!star_level.equals("") && !select_s.equals("")) {
652
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
653
                        tv_make_sure.setEnabled(true);
654
                    } else {
655
                        tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
656
                        tv_make_sure.setEnabled(false);
657
                    }
658
                } else {
659
                    if (et_pinglun.getText().toString().equals("#" + MainApplication.huodonglabel + "# ")) {
660
                        if (!star_level.equals("") && !select_s.equals("")) {
661
                            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
662
                            tv_make_sure.setEnabled(true);
663
                        } else {
664
                            tv_make_sure.setTextColor(getResources().getColor(R.color.huise));
665
                            tv_make_sure.setEnabled(false);
666
                        }
667
                    } else {
668
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
669
                        tv_make_sure.setEnabled(true);
670
                    }
671
                }
672 614
                return true;
673 615
            }
674 616
        });
@ -1223,8 +1165,8 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
1223 1165
                new Thread(new Runnable() {
1224 1166
                    @Override
1225 1167
                    public void run() {
1226
                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
1227
                        tv_make_sure.setEnabled(true);
1168
//                        tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
1169
//                        tv_make_sure.setEnabled(true);
1228 1170
                    }
1229 1171
                }).start();
1230 1172
@ -1235,10 +1177,10 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
1235 1177
    @Override
1236 1178
    protected void onResume() {
1237 1179
        super.onResume();
1238
        if (Bimp.tempSelectBitmap.size() > 0) {
1239
            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
1240
            tv_make_sure.setEnabled(true);
1241
        }
1180
//        if (Bimp.tempSelectBitmap.size() > 0) {
1181
//            tv_make_sure.setTextColor(getResources().getColor(R.color.lvse));
1182
//            tv_make_sure.setEnabled(true);
1183
//        }
1242 1184
        mAdapter.notifyDataSetChanged();
1243 1185
1244 1186
        if (mInsterType == 1 && mAdapter.getItemCount() == 1) {

+ 2 - 2
app/src/main/java/com/electric/chargingpile/adapter/CommentTopicAdapter.java

@ -58,8 +58,8 @@ public class CommentTopicAdapter extends RecyclerView.Adapter<CommentTopicAdapte
58 58
59 59
        holder.title.setText(data.getMeg());
60 60
61
        holder.participateText.setText(Util.convetW(data.getPartake_number(),"暂无","车主参与"));
62
        holder.onlookersText.setText(Util.convetW(data.getLook_number(),"暂无","车主围观"));
61
        holder.participateText.setText(data.getPartake_number());
62
        holder.onlookersText.setText(data.getLook_number());
63 63
64 64
        holder.itemView.setOnClickListener(v->{
65 65
            if (mListener!=null)

+ 0 - 8
app/src/main/java/com/electric/chargingpile/adapter/NewPingLunAdapter.java

@ -156,14 +156,6 @@ public class NewPingLunAdapter extends BaseAdapter {
156 156
        {
157 157
            final View finalConvertView2 = convertView;
158 158
            try {
159
                String is_play = TextUtils.isEmpty( datas.get(position).getString("is_play"))?"": datas.get(position).getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
160
161
                if (!TextUtils.isEmpty(is_play) && is_play.equals("1")){
162
                    convertView.setVisibility(View.VISIBLE);
163
                }else{
164
                    convertView.setVisibility(View.GONE);
165
                }
166
167 159
//                "fileUrl":"","thumUrl":""
168 160
                //父级评论图片
169 161
                String fileUrl = datas.get(position).getString("fileUrl");

+ 1 - 7
app/src/main/java/com/electric/chargingpile/adapter/ZhanCommentsAapter.java

@ -433,13 +433,8 @@ public class ZhanCommentsAapter extends BaseAdapter {
433 433
                    }
434 434
                });
435 435
436
                String is_play = TextUtils.isEmpty( datas.get(position).getString("is_play"))?"": datas.get(position).getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
436
                String type = TextUtils.isEmpty(datas.get(position).getString("type"))?"":datas.get(position).getString("type"); //23 视频,24 图片
437 437
438
                if (!TextUtils.isEmpty(is_play) && is_play.equals("1")){
439
                    convertView.setVisibility(View.VISIBLE);
440
                }else{
441
                    convertView.setVisibility(View.GONE);
442
                }
443 438
444 439
                //父级评论图片
445 440
                String fileUrl = datas.get(position).getString("fileUrl");
@ -448,7 +443,6 @@ public class ZhanCommentsAapter extends BaseAdapter {
448 443
                fileUrl = fileUrl == null?"":fileUrl;
449 444
                file2Url= file2Url == null?"":file2Url;
450 445
                file3Url= file3Url == null?"":file3Url;
451
                String type = TextUtils.isEmpty(datas.get(position).getString("type"))?"":datas.get(position).getString("type"); //23 视频,24 图片
452 446
                if (type.equals("23")){
453 447
                    holder.imgVideo.setVisibility(View.VISIBLE);
454 448
                    holder.imgStart.setVisibility(View.VISIBLE);

+ 6 - 1
app/src/main/java/com/electric/chargingpile/fragment/NewMyMessageFragment.java

@ -136,7 +136,12 @@ public class NewMyMessageFragment extends Fragment {
136 136
                                    JSONObject jsonObject4 = (JSONObject) jsonArray
137 137
                                            .opt(j);
138 138
                                    String is_play = TextUtils.isEmpty( jsonObject4.getString("is_play"))?"": jsonObject4.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
139
                                    if (is_play.equals("1")){
139
                                    String type = TextUtils.isEmpty(jsonObject4.getString("type"))?"":jsonObject4.getString("type"); //23 视频,24 图片
140
                                    if (type.equals("23")){
141
                                        if (is_play.equals("1")){
142
                                            datas.add(jsonObject4);
143
                                        }
144
                                    }else{
140 145
                                        datas.add(jsonObject4);
141 146
                                    }
142 147
                                }

+ 14 - 4
app/src/main/java/com/electric/chargingpile/fragment/ZhanCommentFragment.java

@ -229,7 +229,7 @@ public class ZhanCommentFragment extends Fragment {
229 229
    public void initCommentData(RankinglistRefreshEvent event) {
230 230
        String url = MainApplication.url + "/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
231 231
//        String url = MainApplication.url+"/zhannew/basic/web/index.php/tpappcomments/get-comments?zhanid=" + NewZhanDetailsActivity.zhan_id + "&page=1";
232
//        Log.e(TAG, "getCommentsData=" + url);
232
        Log.e(TAG, "getCommentsData=" + url);
233 233
        OkHttpUtils.get().url(url)
234 234
                .build().connTimeOut(6000).readTimeOut(6000)
235 235
                .execute(new StringCallback() {
@ -256,7 +256,12 @@ public class ZhanCommentFragment extends Fragment {
256 256
                                for (int j = 0; j < jsonArray.length(); j++) {
257 257
                                    JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
258 258
                                    String is_play = TextUtils.isEmpty( jsonObject.getString("is_play"))?"": jsonObject.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
259
                                    if (is_play.equals("1")){
259
                                    String type = TextUtils.isEmpty(jsonObject.getString("type"))?"":jsonObject.getString("type"); //23 视频,24 图片
260
                                    if (type.equals("23")){
261
                                        if (is_play.equals("1")){
262
                                            datas.add(jsonObject);
263
                                        }
264
                                    }else {
260 265
                                        datas.add(jsonObject);
261 266
                                    }
262 267
                                }
@ -309,9 +314,14 @@ public class ZhanCommentFragment extends Fragment {
309 314
                                JSONArray jsonArray = new JSONArray(commentData);
310 315
                                for (int j = 0; j < jsonArray.length(); j++) {
311 316
                                    JSONObject jsonObject = (JSONObject) jsonArray.opt(j);
312
                                    String is_play = TextUtils.isEmpty( jsonObject.getString("is_play"))?"": jsonObject.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
313 317
314
                                    if (is_play.equals("1")){
318
                                    String is_play = TextUtils.isEmpty( jsonObject.getString("is_play"))?"": jsonObject.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
319
                                    String type = TextUtils.isEmpty(jsonObject.getString("type"))?"":jsonObject.getString("type"); //23 视频,24 图片
320
                                     if (type.equals("23")){
321
                                        if (is_play.equals("1")){
322
                                            datas.add(jsonObject);
323
                                        }
324
                                    }else{
315 325
                                        datas.add(jsonObject);
316 326
                                    }
317 327
                                }

+ 2 - 0
app/src/main/java/com/electric/chargingpile/util/CarTypeUtil.java

@ -26,6 +26,8 @@ public class CarTypeUtil {
26 26
                        name0 = strarray[0];
27 27
                    }
28 28
                    car = name0 + name1;
29
                }else{
30
                    car=s;
29 31
                }
30 32
            }
31 33
        }catch (Exception e) {

+ 45 - 7
app/src/main/java/com/electric/chargingpile/view/SignInDialog.java

@ -1,6 +1,8 @@
1 1
package com.electric.chargingpile.view;
2 2
3 3
import android.content.Context;
4
import android.text.Html;
5
import android.text.TextUtils;
4 6
import android.view.Display;
5 7
import android.view.LayoutInflater;
6 8
import android.view.View;
@ -19,7 +21,7 @@ public class SignInDialog {
19 21
    private Context context;
20 22
    private android.app.Dialog dialog;
21 23
    private Display display;
22
    private TextView tv_num, tv_third, tv_second, tv_first, tv_now_temperature, tv_du, tv_w, tv_pm, tv_city;
24
    private TextView tv_num, tv_third, tv_second, tv_first, tv_now_temperature, tv_du, tv_w, tv_pm, tv_city,tv_2;
23 25
    private LinearLayout dialog_bg;
24 26
25 27
    public SignInDialog(Context context) {
@ -37,6 +39,7 @@ public class SignInDialog {
37 39
        // 获取自定义Dialog布局中的控件
38 40
        dialog_bg = (LinearLayout) view.findViewById(R.id.dialog_bg);
39 41
        tv_num = (TextView) view.findViewById(R.id.tv_num);
42
        tv_2 = (TextView) view.findViewById(R.id.tv_2);
40 43
        tv_third = (TextView) view.findViewById(R.id.tv_third);
41 44
        tv_second = (TextView) view.findViewById(R.id.tv_second);
42 45
        tv_first = (TextView) view.findViewById(R.id.tv_first);
@ -59,13 +62,33 @@ public class SignInDialog {
59 62
        return this;
60 63
    }
61 64
62
    public SignInDialog setTitle(String third, String second, String first, String score, String city) {
63
        if (score != null && !score.equals("")) {
64
            tv_num.setText(score);
65
        } else {
66
            tv_num.setText("");
65
    public SignInDialog setTitle(String log_day, String score, String city) {
66
        String third = "", second = "", first = "";
67
        if (TextUtils.isEmpty(log_day)){
68
            log_day="1";
67 69
        }
68
        tv_num.setText(score);
70
        int length = log_day.length();
71
72
        char words[] = log_day.toCharArray();
73
        if (length == 1) {
74
            third = "";
75
            second = "";
76
            first = String.valueOf(words[0]);
77
        } else if (length == 2) {
78
            third = "";
79
            second = String.valueOf(words[0]);
80
            first = String.valueOf(words[1]);
81
        } else if (length == 3) {
82
            third = String.valueOf(words[0]);
83
            second = String.valueOf(words[1]);
84
            first = String.valueOf(words[2]);
85
        }
86
87
88
89
90
91
69 92
        if (third.equals("")) {
70 93
            tv_third.setText("0");
71 94
        } else {
@ -83,6 +106,21 @@ public class SignInDialog {
83 106
        } else {
84 107
            tv_first.setText(first);
85 108
        }
109
110
        if (score != null && !score.equals("")) {
111
            tv_num.setText(Html.fromHtml("今天签到获得 <font color='#01b637'>"+score+"</font> 个充电币"));
112
            int i = 7 - Integer.parseInt(log_day);
113
            if (i>=0){
114
                tv_2.setText("还有"+ i+"天获得充电优惠哦~");
115
            }
116
        } else {
117
            tv_num.setText("");
118
        }
119
120
        if (Integer.parseInt(log_day)>= 7){
121
            tv_num.setText("充电订单折扣优惠券已到账");
122
            tv_2.setText("充电订单八折");
123
        }
86 124
        return this;
87 125
    }
88 126

BIN
app/src/main/res/drawable-xxhdpi/ic_activity_center.webp


BIN
app/src/main/res/drawable-xxhdpi/ic_no_data_search.webp


+ 15 - 0
app/src/main/res/layout/activity_main_map.xml

@ -1497,6 +1497,9 @@
1497 1497
            android:visibility="gone">
1498 1498
1499 1499
            <TextView
1500
                android:id="@+id/notificationText"
1501
                android:maxLines="1"
1502
                android:ellipsize="end"
1500 1503
                android:layout_width="match_parent"
1501 1504
                android:layout_height="27dp"
1502 1505
                android:drawableLeft="@drawable/icon_main_order"
@ -1620,6 +1623,18 @@
1620 1623
                tools:visibility="visible" />
1621 1624
1622 1625
            <ImageView
1626
                android:layout_centerVertical="true"
1627
                android:id="@+id/imgActivityCenter"
1628
                android:layout_width="80dp"
1629
                android:layout_height="80dp"
1630
                android:layout_alignParentRight="true"
1631
                android:layout_marginTop="30dp"
1632
                android:layout_marginRight="12dp"
1633
                android:src="@drawable/ic_activity_center"
1634
                android:visibility="gone"
1635
                tools:visibility="visible" />
1636
1637
            <ImageView
1623 1638
                android:id="@+id/iv_route"
1624 1639
                android:layout_width="wrap_content"
1625 1640
                android:layout_height="wrap_content"

+ 27 - 10
app/src/main/res/layout/activity_search.xml

@ -1,20 +1,12 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3 4
    xmlns:tools="http://schemas.android.com/tools"
4 5
    android:layout_width="match_parent"
5 6
    android:layout_height="match_parent">
6 7

7
    <TextView
8
        android:id="@+id/no_result"
9
        android:layout_width="match_parent"
10
        android:layout_height="match_parent"
11
        android:gravity="center"
12
        android:text="没有匹配到搜索结果"
13
        android:textColor="#999999"
14
        android:visibility="gone"
15
        tools:visibility="visible"
16
        android:textSize="16sp" />
17 8
    <com.zhy.autolayout.AutoLinearLayout
9
        android:id="@+id/autoLinearLayout"
18 10
        android:layout_width="match_parent"
19 11
        android:layout_height="match_parent"
20 12
        android:background="@color/activity_bgcolor"
@ -189,5 +181,30 @@
189 181
            android:listSelector="@color/transparent" />
190 182
    </com.zhy.autolayout.AutoLinearLayout>
191 183

184
    <ImageView
185
        android:id="@+id/imgNoData"
186
        android:layout_width="wrap_content"
187
        android:layout_height="wrap_content"
188
        android:src="@drawable/ic_no_data_search"
189
        app:layout_constraintBottom_toBottomOf="parent"
190
        app:layout_constraintEnd_toEndOf="parent"
191
        app:layout_constraintStart_toStartOf="parent"
192
        android:visibility="gone"
193
        app:layout_constraintTop_toTopOf="parent" tools:visibility="visible" />
194

195
    <TextView
196
        android:layout_marginTop="28dp"
197
        android:id="@+id/no_result"
198
        android:layout_width="wrap_content"
199
        android:layout_height="wrap_content"
200
        android:gravity="center"
201
        android:text="小主没有您要的内容,请重新输入试试"
202
        android:textColor="#999999"
203
        android:textSize="16sp"
204
        android:visibility="gone"
205
        app:layout_constraintStart_toStartOf="@+id/imgNoData"
206
        app:layout_constraintEnd_toEndOf="@+id/imgNoData"
207
        app:layout_constraintTop_toBottomOf="@+id/imgNoData"
208
        tools:visibility="visible" />
192 209

193 210
</androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 1
app/src/main/res/layout/activity_zhan_comment.xml

@ -189,7 +189,7 @@
189 189
                android:layout_marginBottom="7dp"
190 190
                android:background="@color/white"
191 191
                android:gravity="left|top"
192
                android:hint="对本次充电感受如何?跟其他车友分享一下吧~"
192
                android:hint="您的充电体验、站点吐槽、充电趣事,来和其他车友分享吧~"
193 193
                android:paddingLeft="15dp"
194 194
                android:paddingTop="12dp"
195 195
                android:paddingRight="15dp"

+ 3 - 19
app/src/main/res/layout/item_signin.xml

@ -158,28 +158,12 @@
158 158
            android:layout_marginBottom="6dp">
159 159
160 160
            <TextView
161
                android:layout_width="wrap_content"
162
                android:layout_height="wrap_content"
163
                android:text="今天签到获得"
164
                android:textSize="16sp"
165
                android:textColor="@color/ui_62"/>
166
167
            <TextView
168 161
                android:id="@+id/tv_num"
169
                android:layout_width="wrap_content"
162
                android:layout_width="match_parent"
170 163
                android:layout_height="wrap_content"
171 164
                android:text=""
172
                android:textSize="16sp"
173
                android:textColor="@color/lvse"/>
174
175
            <TextView
176
                android:layout_width="wrap_content"
177
                android:layout_height="wrap_content"
178
                android:text="个充电币"
179
                android:textSize="16sp"
180
                android:textColor="@color/ui_62"/>
181
182
165
                android:textColor="@color/ui_62"
166
                android:textSize="16sp" />
183 167
        </LinearLayout>
184 168
185 169
        <TextView

+ 3 - 0
app/src/main/res/layout/item_zhancomments.xml

@ -63,6 +63,7 @@
63 63
                    android:orientation="horizontal">
64 64
65 65
                    <TextView
66
                        android:layout_gravity="center_vertical"
66 67
                        android:id="@+id/tv_pname"
67 68
                        android:layout_width="wrap_content"
68 69
                        android:layout_height="wrap_content"
@ -75,6 +76,7 @@
75 76
                        tools:text="gin" />
76 77
77 78
                    <ImageView
79
                        android:layout_gravity="center_vertical"
78 80
                        android:id="@+id/certified_icon"
79 81
                        android:layout_width="18dp"
80 82
                        android:layout_height="18dp"
@ -83,6 +85,7 @@
83 85
                        android:src="@drawable/certified_icon" />
84 86
85 87
                    <TextView
88
                        android:layout_gravity="center_vertical"
86 89
                        android:id="@+id/tv_pcar"
87 90
                        android:layout_width="match_parent"
88 91
                        android:layout_height="wrap_content"

+ 1 - 1
app/src/main/res/values/strings.xml

@ -18,7 +18,7 @@
18 18
    <string name="updated_at">上次更新于%1$s前</string>
19 19
    <string name="updated_just_now">刚刚更新</string>
20 20
    <string name="time_error">时间有问题</string>
21
    <string name="string_tab_qa">社区</string>
21
    <string name="string_tab_qa">互助</string>
22 22
23 23
24 24
    <string name="main_name">主界面</string>

完成评论视频详情页 · 522af193e4 - Gogs: Go Git Service
Pārlūkot izejas kodu

完成评论视频详情页

hy 4 gadi atpakaļ
vecāks
revīzija
522af193e4

+ 4 - 3
app/build.gradle

@ -223,9 +223,10 @@ dependencies {
223 223
    //    implementation 'com.github.castorflex.verticalviewpager:library:19.0.1'
224 224
    // sqlite异常结局
225 225
    implementation 'net.zetetic:android-database-sqlcipher:3.5.7@aar'
226
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.1.5-jitpack'
227
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv7a:v8.1.5-jitpack'
228
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv64:v8.1.5-jitpack'
226
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.2.0-release-jitpack'
227
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv7a:v8.2.0-release-jitpack'
228
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-arm64:v8.2.0-release-jitpack'
229
229 230
    implementation 'com.wang.avi:library:2.1.3'
230 231
    implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
231 232
    implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'

+ 4 - 0
app/src/main/AndroidManifest.xml

@ -103,6 +103,10 @@
103 103
            android:name=".activity.ImageDisplayActivity"
104 104
            android:screenOrientation="portrait"/>
105 105
        <activity
106
            android:windowSoftInputMode="adjustResize|stateHidden"
107
            android:name=".activity.CommentVideoDetailActivity"
108
            android:screenOrientation="portrait"/>
109
        <activity
106 110
            android:name=".activity.VideoCompressionActivity"
107 111
            android:screenOrientation="portrait"/>
108 112
        <activity

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

@ -61,7 +61,7 @@ public class ChatActivity extends AppCompatActivity implements View.OnClickListe
61 61
        initView();
62 62
        initListener();
63 63
        isRefresh = true;
64
        updateView(0);
64
        updateView(1);
65 65
    }
66 66
67 67
    private void initView() {

+ 2 - 2
app/src/main/java/com/electric/chargingpile/activity/ChatContentListActivity.java

@ -370,8 +370,8 @@ public class ChatContentListActivity extends AppCompatActivity {
370 370
371 371
            videoPlayer.setGSYVideoProgressListener(new GSYVideoProgressListener() {
372 372
                @Override
373
                public void onProgress(int i, int i1, int i2, int i3) {
374
                    progressBar.setProgress(i);
373
                public void onProgress(long progress, long secProgress, long currentPosition, long duration) {
374
                    progressBar.setProgress(Math.toIntExact(progress));
375 375
                }
376 376
            });
377 377

+ 131 - 0
app/src/main/java/com/electric/chargingpile/activity/CommentVideoDetailActivity.java

@ -0,0 +1,131 @@
1
package com.electric.chargingpile.activity;
2
3
import android.content.Context;
4
import android.content.Intent;
5
import android.os.Bundle;
6
import android.util.Log;
7
8
import androidx.annotation.Nullable;
9
import androidx.appcompat.app.AppCompatActivity;
10
11
import com.electric.chargingpile.R;
12
import com.electric.chargingpile.application.MainApplication;
13
import com.electric.chargingpile.data.SingleCommentBean;
14
import com.electric.chargingpile.util.JsonUtils;
15
import com.electric.chargingpile.util.LoadingDialog;
16
import com.electric.chargingpile.video.VideoPlayer;
17
import com.google.gson.Gson;
18
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView;
19
import com.zhy.http.okhttp.OkHttpUtils;
20
import com.zhy.http.okhttp.callback.StringCallback;
21
22
import org.json.JSONException;
23
import org.json.JSONObject;
24
25
import okhttp3.Call;
26
27
public class CommentVideoDetailActivity extends AppCompatActivity {
28
29
    private VideoPlayer mVideoPlayer;
30
    private Gson mGson=new Gson();
31
    private String pid;
32
    private LoadingDialog mLoadingDialog = null ;
33
    @Override
34
    protected void onCreate(@Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
35
        super.onCreate(savedInstanceState);
36
        setContentView(R.layout.activity_video_detail);
37
        initView();
38
        pid = getIntent().getStringExtra("id");
39
        if (null != pid && !pid.equals("")) {
40
            getCommentData();
41
        }
42
43
    }
44
45
46
    private void initView() {
47
        mLoadingDialog = new LoadingDialog(this);
48
        mLoadingDialog.setCanceledOnTouchOutside(false);
49
50
        mVideoPlayer = findViewById(R.id.videoPlayer);
51
52
    }
53
54
55
    private void getCommentData() {
56
        String url = MainApplication.url + "/zhannew/basic/web/index.php/tpappcomments/get-sub-comments?id=" + pid;
57
        Log.e("getCommentData_url=", url);
58
        mLoadingDialog.show();
59
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
60
            @Override
61
            public void onError(Call call, Exception e) {
62
                if (mLoadingDialog.isShowing()){
63
                    mLoadingDialog.dismiss();
64
                }
65
            }
66
67
            @Override
68
            public void onResponse(String response) {
69
                if (mLoadingDialog.isShowing()){
70
                    mLoadingDialog.dismiss();
71
                }
72
73
                Log.e("respone==", response);
74
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
75
                if (null != rtnCode && rtnCode.equals("01")) {
76
                    try {
77
                        JSONObject jsonObj = new JSONObject(response);
78
                        String commentData = jsonObj.getString("data");
79
                        Log.e("commentBean==", commentData);
80
                        JSONObject obj = new JSONObject(commentData);
81
                        SingleCommentBean singleCommentBean = mGson.fromJson(commentData, SingleCommentBean.class);
82
                        String fileUrl = singleCommentBean.getFileUrl();
83
                        String url = MainApplication.CDN + fileUrl;
84
                        mVideoPlayer.setUp(url, true, "");
85
                        mVideoPlayer.startPlayLogic();
86
87
                    } catch (JSONException e) {
88
                        e.printStackTrace();
89
                        Log.e("respone==", "onResponse: "+e.getMessage());
90
                    }
91
                } else {
92
93
                }
94
            }
95
        });
96
    }
97
98
    @Override
99
    protected void onResume() {
100
        super.onResume();
101
        playOrPause();
102
    }
103
    private void playOrPause() {
104
        int currentStatue = mVideoPlayer.getCurrentState();
105
        if (currentStatue == GSYVideoView.CURRENT_STATE_PLAYING) {
106
            mVideoPlayer.onVideoPause();
107
        } else if (currentStatue == GSYVideoView.CURRENT_STATE_PAUSE) {
108
            mVideoPlayer.onVideoResume(false);
109
        } else {
110
            mVideoPlayer.startPlayLogic();
111
        }
112
    }
113
114
    @Override
115
    protected void onPause() {
116
        super.onPause();
117
        playOrPause();
118
    }
119
120
    @Override
121
    protected void onDestroy() {
122
        super.onDestroy();
123
        mVideoPlayer.release();
124
    }
125
126
    public  static void actioinStart(Context context, String id){
127
        Intent intent = new Intent(context, CommentVideoDetailActivity.class);
128
        intent.putExtra("id",id);
129
        context.startActivity(intent);
130
    }
131
}

+ 112 - 30
app/src/main/java/com/electric/chargingpile/activity/SingleCommentActivity.java

@ -7,6 +7,7 @@ import android.os.Bundle;
7 7
import android.os.Handler;
8 8
import android.text.SpannableString;
9 9
import android.text.Spanned;
10
import android.text.TextUtils;
10 11
import android.text.style.ForegroundColorSpan;
11 12
import android.util.Log;
12 13
import android.view.LayoutInflater;
@ -21,11 +22,13 @@ import android.widget.ScrollView;
21 22
import android.widget.TextView;
22 23
import android.widget.Toast;
23 24
25
import com.bumptech.glide.Glide;
24 26
import com.electric.chargingpile.R;
25 27
import com.electric.chargingpile.adapter.ZhanSCommentsAdapter;
26 28
import com.electric.chargingpile.application.MainApplication;
27 29
import com.electric.chargingpile.data.MyOtto;
28 30
import com.electric.chargingpile.data.RankinglistRefreshEvent;
31
29 32
import com.electric.chargingpile.fragment.ZhanCommentFragment;
30 33
import com.electric.chargingpile.util.BarColorUtil;
31 34
import com.electric.chargingpile.util.CarTypeUtil;
@ -38,6 +41,7 @@ import com.electric.chargingpile.util.Util;
38 41
import com.electric.chargingpile.view.CircleImageView;
39 42
import com.electric.chargingpile.view.ContainsEmojiEditText;
40 43
import com.electric.chargingpile.view.CustomScrollView;
44
import com.google.gson.Gson;
41 45
import com.squareup.otto.Subscribe;
42 46
import com.squareup.picasso.Picasso;
43 47
import com.zhy.http.okhttp.OkHttpUtils;
@ -58,7 +62,7 @@ import java.util.regex.Pattern;
58 62
import okhttp3.Call;
59 63
60 64
public class SingleCommentActivity extends Activity implements View.OnClickListener {
61
    private ImageView iv_back, iv_commentPic, iv_pgrade, iv_pzan, iv_level_img;
65
    private ImageView iv_back, iv_commentPic, iv_pgrade, iv_pzan, iv_level_img,imgVideo,imgStart,imgTwo,imgThree;
62 66
    private ListView lv_scomment;
63 67
    private CircleImageView iv_picon;
64 68
    private CustomScrollView scrollView;
@ -77,7 +81,8 @@ public class SingleCommentActivity extends Activity implements View.OnClickListe
77 81
    private RelativeLayout rl_point;
78 82
    private android.view.animation.Animation animation;
79 83
    private ImageView certified_icon;
80
84
    private RelativeLayout imgLayout;
85
    private Gson mGson = new Gson();
81 86
    @Override
82 87
    protected void onCreate(Bundle savedInstanceState) {
83 88
        super.onCreate(savedInstanceState);
@ -114,6 +119,11 @@ public class SingleCommentActivity extends Activity implements View.OnClickListe
114 119
        certified_icon = (ImageView)findViewById(R.id.certified_icon);
115 120
        fl_ptag = (TagFlowLayout) findViewById(R.id.fl_ptag);
116 121
        iv_commentPic = (ImageView) findViewById(R.id.iv_commentPic);
122
        imgTwo = (ImageView) findViewById(R.id.imgTwo);
123
        imgThree = (ImageView) findViewById(R.id.imgThree);
124
        imgVideo = (ImageView) findViewById(R.id.imgVideo);
125
        imgStart = (ImageView) findViewById(R.id.imgStart);
126
        imgLayout = findViewById(R.id.imgLayout);
117 127
        iv_pgrade = (ImageView) findViewById(R.id.iv_pgrade);
118 128
        iv_pzan = (ImageView) findViewById(R.id.iv_pzan);
119 129
        et_commet = (ContainsEmojiEditText) findViewById(R.id.et_commet);
@ -167,12 +177,10 @@ public class SingleCommentActivity extends Activity implements View.OnClickListe
167 177
                        Log.e("single==", "dealData: size=" + datas.size());
168 178
                        lv_scomment.setAdapter(new ZhanSCommentsAdapter(datas, SingleCommentActivity.this, getApplicationContext(), "2", ""));
169 179
170
                        new Handler().post(new Runnable() {
171
                            @Override
172
                            public void run() {
180
                        new Handler().post(()-> {
173 181
                                scrollView.fullScroll(ScrollView.FOCUS_UP);
174 182
                            }
175
                        });
183
                        );
176 184
                    } catch (JSONException e) {
177 185
                        e.printStackTrace();
178 186
                    }
@ -284,32 +292,96 @@ public class SingleCommentActivity extends Activity implements View.OnClickListe
284 292
            }
285 293
        }
286 294
        //设置图片
287
        String thumUrl = JsonUtils.getKeyResult(data, "thumUrl");
288 295
        String fileUrl = JsonUtils.getKeyResult(data, "fileUrl");
289
        if (!thumUrl.equals("")) {
290
            iv_commentPic.setVisibility(View.VISIBLE);
291
//            String url = "http://59.110.68.162"+"/zhannew/uploadfile/"+thumUrl;
292
            String url = MainApplication.url + "/zhannew/uploadfile/" + thumUrl;
293
            String file_url = MainApplication.url + "/zhannew/uploadfile/" + fileUrl;
294
//            String file_url = "http://59.110.68.162"+"/zhannew/uploadfile/"+fileUrl;
295
            final String[] ss = {file_url};
296
            Picasso.with(MainApplication.context)
297
                    .load(url)
298
                    .placeholder(R.drawable.icon_user1118)
299
                    .error(R.drawable.icon_user1118)
300
                    .into(iv_commentPic);
301
            iv_commentPic.setOnClickListener(new View.OnClickListener() {
302
                @Override
303
                public void onClick(View v) {
304
                    Intent intent = new Intent(getApplicationContext(), ImagePagerActivity.class);
305
                    // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
306
                    intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, ss);
307
                    intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
308
                    startActivity(intent);
309
                }
296
        fileUrl=fileUrl==null?"":fileUrl;
297
        String file2Url =  JsonUtils.getKeyResult(data, "file2Url");
298
        file2Url=file2Url==null?"":file2Url;
299
        String file3Url =  JsonUtils.getKeyResult(data, "file3Url");
300
        file3Url=file3Url==null?"":file3Url;
301
        String type = JsonUtils.getKeyResult(data, "type")==null?"":JsonUtils.getKeyResult(data, "type"); //23 视频,24 图片
302
        if (type.equals("23")){
303
           imgVideo.setVisibility(View.VISIBLE);
304
           imgStart.setVisibility(View.VISIBLE);
305
           imgLayout.setVisibility(View.VISIBLE);
306
307
           iv_commentPic.setVisibility(View.GONE);
308
           imgTwo.setVisibility(View.GONE);
309
           imgThree.setVisibility(View.GONE);
310
311
            String thumUrl = JsonUtils.getKeyResult(data, "thumUrl");
312
            if (!TextUtils.isEmpty(thumUrl) && !TextUtils.isEmpty(fileUrl)){
313
                Glide.with(this)
314
                        .load(MainApplication.CDN +thumUrl)
315
                        .into(imgVideo);
316
317
                imgVideo.setOnClickListener(v->{
318
                    CommentVideoDetailActivity.actioinStart(this,pid);
319
                });
320
            }
321
322
        }else {
323
324
            imgVideo.setVisibility(View.GONE);
325
            imgStart.setVisibility(View.GONE);
326
327
328
            if (!fileUrl.equals("")) {
329
                iv_commentPic.setVisibility(View.VISIBLE);
330
                imgLayout.setVisibility(View.VISIBLE);
331
332
                Picasso.with(this)
333
                        .load(MainApplication.url + "/zhannew/uploadfile/"+fileUrl)
334
                        .into(iv_commentPic);
335
336
            } else {
337
                iv_commentPic.setVisibility(View.GONE);
338
                imgLayout.setVisibility(View.GONE);
339
            }
340
            if (!file2Url.equals("")) {
341
                imgTwo.setVisibility(View.VISIBLE);
342
                Picasso.with(this)
343
                        .load(MainApplication.url + "/zhannew/uploadfile/"+file2Url)
344
                        .into(imgTwo);
345
            } else {
346
                imgTwo.setVisibility(View.GONE);
347
            }
348
            if (!file3Url.equals("")) {
349
                imgThree.setVisibility(View.VISIBLE);
350
                Picasso.with(this)
351
                        .load(MainApplication.url + "/zhannew/uploadfile/"+file3Url)
352
                        .into(imgThree);
353
            } else {
354
                imgThree.setVisibility(View.GONE);
355
            }
356
357
            String[] fileUrlArray = null;
358
            if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url) &&!TextUtils.isEmpty(file3Url)){
359
                fileUrlArray =new String[]{
360
                        MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
361
                        MainApplication.url + "/zhannew/uploadfile/"+file2Url,
362
                        MainApplication.url + "/zhannew/uploadfile/"+file3Url
363
                };
364
            }else  if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url)){
365
                fileUrlArray =new String[]{
366
                        MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
367
                        MainApplication.url + "/zhannew/uploadfile/"+file2Url
368
                };
369
            }else  if (!TextUtils.isEmpty(fileUrl)){
370
                fileUrlArray =new String[]{ MainApplication.url + "/zhannew/uploadfile/"+fileUrl};
371
            }
372
373
374
            String[] finalFileUrlArray = fileUrlArray;
375
            iv_commentPic.setOnClickListener(v->{
376
                startImagePager(finalFileUrlArray, 0);
377
            });
378
379
            imgTwo.setOnClickListener(v->{
380
                startImagePager(finalFileUrlArray, 1);
381
            });
382
            imgThree.setOnClickListener(v->{
383
                startImagePager(finalFileUrlArray, 2);
310 384
            });
311
        } else {
312
            iv_commentPic.setVisibility(View.GONE);
313 385
        }
314 386
        //设置评分
315 387
        String grade = JsonUtils.getKeyResult(data, "star_level");
@ -422,6 +494,16 @@ public class SingleCommentActivity extends Activity implements View.OnClickListe
422 494
423 495
    }
424 496
497
    private void startImagePager(String[] finalFileUrlArray, int i) {
498
499
500
        Intent intent = new Intent(SingleCommentActivity.this, ImagePagerActivity.class);
501
        // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
502
        intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
503
        intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, i);
504
        startActivity(intent);
505
    }
506
425 507
    @Override
426 508
    public void onClick(View v) {
427 509
        switch (v.getId()) {

+ 31 - 11
app/src/main/java/com/electric/chargingpile/adapter/NewPingLunAdapter.java

@ -28,6 +28,7 @@ import com.electric.chargingpile.R;
28 28
import com.electric.chargingpile.activity.ImagePagerActivity;
29 29
import com.electric.chargingpile.activity.NewZhanDetailsActivity;
30 30
import com.electric.chargingpile.activity.SingleCommentActivity;
31
import com.electric.chargingpile.activity.CommentVideoDetailActivity;
31 32
import com.electric.chargingpile.application.MainApplication;
32 33
import com.electric.chargingpile.util.JsonUtils;
33 34
import com.electric.chargingpile.util.Util;
@ -153,29 +154,48 @@ public class NewPingLunAdapter extends BaseAdapter {
153 154
        }
154 155
155 156
        {
157
            final View finalConvertView2 = convertView;
156 158
            try {
159
                String is_play = TextUtils.isEmpty( datas.get(position).getString("is_play"))?"": datas.get(position).getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
160
161
                if (TextUtils.isEmpty(is_play) && is_play.equals("1")){
162
                    convertView.setVisibility(View.VISIBLE);
163
                }else{
164
                    convertView.setVisibility(View.GONE);
165
                }
166
157 167
//                "fileUrl":"","thumUrl":""
158 168
                //父级评论图片
159 169
                String fileUrl = datas.get(position).getString("fileUrl");
160 170
                String file2Url = datas.get(position).getString("file2Url");
161 171
                String file3Url = datas.get(position).getString("file3Url");
162
                String type = datas.get(position).getString("type"); //23 视频,24 图片
172
173
174
                fileUrl=fileUrl==null?"":fileUrl;
175
                file2Url=file2Url==null?"":file2Url;
176
                file3Url=file3Url==null?"":file3Url;
177
                String type = TextUtils.isEmpty(datas.get(position).getString("type"))?"":datas.get(position).getString("type"); //23 视频,24 图片
163 178
                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);
179
                    holder.imgVideo.setVisibility(View.VISIBLE);
180
                    holder.imgStart.setVisibility(View.VISIBLE);
181
                    holder.imgLayout.setVisibility(View.VISIBLE);
168 182
169
                        holder.iv_commentPic.setVisibility(View.GONE);
170
                        holder.imgTwo.setVisibility(View.GONE);
171
                        holder.imgThree.setVisibility(View.GONE);
183
                    holder.iv_commentPic.setVisibility(View.GONE);
184
                    holder.imgTwo.setVisibility(View.GONE);
185
                    holder.imgThree.setVisibility(View.GONE);
172 186
187
                    String thumUrl = datas.get(position).getString("thumUrl");
188
                    if (!TextUtils.isEmpty(thumUrl) && !TextUtils.isEmpty(fileUrl)){
173 189
                        Glide.with(MainApplication.context)
174
                                .load(MainApplication.CDN +fileUrl)
190
                                .load(MainApplication.CDN +thumUrl)
175 191
                                .into(holder.imgVideo);
176 192
177 193
                        holder.imgVideo.setOnClickListener(v->{
178
194
                            try {
195
                                CommentVideoDetailActivity.actioinStart(finalConvertView2.getContext(),datas.get(position).getString("id"));
196
                            } catch (JSONException e) {
197
                                e.printStackTrace();
198
                            }
179 199
                        });
180 200
                    }
181 201
                }else {
@ -230,7 +250,7 @@ public class NewPingLunAdapter extends BaseAdapter {
230 250
                        fileUrlArray =new String[]{ MainApplication.url + "/zhannew/uploadfile/"+fileUrl};
231 251
                    }
232 252
233
                    final View finalConvertView2 = convertView;
253
234 254
                    String[] finalFileUrlArray = fileUrlArray;
235 255
                    holder.iv_commentPic.setOnClickListener(new View.OnClickListener() {
236 256
                        @Override

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

@ -27,6 +27,7 @@ import com.electric.chargingpile.activity.LoginActivity;
27 27
import com.electric.chargingpile.activity.MainMapActivity;
28 28
import com.electric.chargingpile.activity.NewZhanDetailsActivity;
29 29
import com.electric.chargingpile.activity.SingleCommentActivity;
30
import com.electric.chargingpile.activity.CommentVideoDetailActivity;
30 31
import com.electric.chargingpile.application.MainApplication;
31 32
import com.electric.chargingpile.fragment.ZhanCommentFragment;
32 33
import com.electric.chargingpile.util.CarTypeUtil;
@ -431,33 +432,41 @@ public class ZhanCommentsAapter extends BaseAdapter {
431 432
432 433
                    }
433 434
                });
435
436
                String is_play = TextUtils.isEmpty( datas.get(position).getString("is_play"))?"": datas.get(position).getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
437
438
                if (TextUtils.isEmpty(is_play) && is_play.equals("1")){
439
                    convertView.setVisibility(View.VISIBLE);
440
                }else{
441
                    convertView.setVisibility(View.GONE);
442
                }
443
434 444
                //父级评论图片
435 445
                String fileUrl = datas.get(position).getString("fileUrl");
436 446
                String file2Url = datas.get(position).getString("file2Url");
437 447
                String file3Url = datas.get(position).getString("file3Url");
438
                String type = datas.get(position).getString("type"); //23 视频,24 图片
448
                fileUrl = fileUrl == null?"":fileUrl;
449
                file2Url= file2Url == null?"":file2Url;
450
                file3Url= file3Url == null?"":file3Url;
451
                String type = TextUtils.isEmpty(datas.get(position).getString("type"))?"":datas.get(position).getString("type"); //23 视频,24 图片
439 452
                if (type.equals("23")){
453
                    holder.imgVideo.setVisibility(View.VISIBLE);
454
                    holder.imgStart.setVisibility(View.VISIBLE);
455
                    holder.imgLayout.setVisibility(View.VISIBLE);
440 456
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);
457
                    holder.iv_commentPic.setVisibility(View.GONE);
458
                    holder.imgTwo.setVisibility(View.GONE);
459
                    holder.imgThree.setVisibility(View.GONE);
449 460
461
                    String thumUrl = datas.get(position).getString("thumUrl");
462
                    if (!TextUtils.isEmpty(thumUrl) && !TextUtils.isEmpty(fileUrl)){
450 463
                        Glide.with(MainApplication.context)
451 464
                                .load(MainApplication.CDN +thumUrl)
452 465
                                .into(holder.imgVideo);
453 466
454 467
                        holder.imgVideo.setOnClickListener(v->{
455 468
                            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
                                }
469
                                CommentVideoDetailActivity.actioinStart(finalConvertView1.getContext(),datas.get(position).getString("id"));
461 470
                            } catch (JSONException e) {
462 471
                                e.printStackTrace();
463 472
                            }

+ 287 - 0
app/src/main/java/com/electric/chargingpile/data/SingleCommentBean.java

@ -0,0 +1,287 @@
1
package com.electric.chargingpile.data;
2
3
import java.util.List;
4
5
6
public class SingleCommentBean  {
7
8
    private String id;
9
10
    private String ancestorid;
11
12
    private String parentid;
13
14
    private String userid;
15
16
    private String agreeNum;
17
18
    private String tel;
19
20
    private String hascar;
21
22
    private String zhanid;
23
24
    private String content;
25
26
    private String fileUrl;
27
28
    private String file2Url;
29
30
    private String file3Url;
31
32
    private String theme;
33
34
    private String isPlay;
35
36
    private String type;
37
38
    private String thumUrl;
39
40
    private String addtime;
41
42
    private String nickname;
43
44
    private String userpic;
45
46
    private String username;
47
48
    private String chexing;
49
50
    private String fine;
51
52
    private String commentsCount;
53
54
    private String starLevel;
55
56
    private String tag;
57
58
    private List<SubcommentBean> subcomments;
59
60
    private Integer isCertifiedOwner;
61
62
    private String title;
63
64
    public String getId() {
65
        return id;
66
    }
67
68
    public void setId(String id) {
69
        this.id = id;
70
    }
71
72
    public String getAncestorid() {
73
        return ancestorid;
74
    }
75
76
    public void setAncestorid(String ancestorid) {
77
        this.ancestorid = ancestorid;
78
    }
79
80
    public String getParentid() {
81
        return parentid;
82
    }
83
84
    public void setParentid(String parentid) {
85
        this.parentid = parentid;
86
    }
87
88
    public String getUserid() {
89
        return userid;
90
    }
91
92
    public void setUserid(String userid) {
93
        this.userid = userid;
94
    }
95
96
    public String getAgreeNum() {
97
        return agreeNum;
98
    }
99
100
    public void setAgreeNum(String agreeNum) {
101
        this.agreeNum = agreeNum;
102
    }
103
104
    public String getTel() {
105
        return tel;
106
    }
107
108
    public void setTel(String tel) {
109
        this.tel = tel;
110
    }
111
112
    public String getHascar() {
113
        return hascar;
114
    }
115
116
    public void setHascar(String hascar) {
117
        this.hascar = hascar;
118
    }
119
120
    public String getZhanid() {
121
        return zhanid;
122
    }
123
124
    public void setZhanid(String zhanid) {
125
        this.zhanid = zhanid;
126
    }
127
128
    public String getContent() {
129
        return content;
130
    }
131
132
    public void setContent(String content) {
133
        this.content = content;
134
    }
135
136
    public String getFileUrl() {
137
        return fileUrl;
138
    }
139
140
    public void setFileUrl(String fileUrl) {
141
        this.fileUrl = fileUrl;
142
    }
143
144
    public String getFile2Url() {
145
        return file2Url;
146
    }
147
148
    public void setFile2Url(String file2Url) {
149
        this.file2Url = file2Url;
150
    }
151
152
    public String getFile3Url() {
153
        return file3Url;
154
    }
155
156
    public void setFile3Url(String file3Url) {
157
        this.file3Url = file3Url;
158
    }
159
160
    public String getTheme() {
161
        return theme;
162
    }
163
164
    public void setTheme(String theme) {
165
        this.theme = theme;
166
    }
167
168
    public String getIsPlay() {
169
        return isPlay;
170
    }
171
172
    public void setIsPlay(String isPlay) {
173
        this.isPlay = isPlay;
174
    }
175
176
    public String getType() {
177
        return type;
178
    }
179
180
    public void setType(String type) {
181
        this.type = type;
182
    }
183
184
    public String getThumUrl() {
185
        return thumUrl;
186
    }
187
188
    public void setThumUrl(String thumUrl) {
189
        this.thumUrl = thumUrl;
190
    }
191
192
    public String getAddtime() {
193
        return addtime;
194
    }
195
196
    public void setAddtime(String addtime) {
197
        this.addtime = addtime;
198
    }
199
200
    public String getNickname() {
201
        return nickname;
202
    }
203
204
    public void setNickname(String nickname) {
205
        this.nickname = nickname;
206
    }
207
208
    public String getUserpic() {
209
        return userpic;
210
    }
211
212
    public void setUserpic(String userpic) {
213
        this.userpic = userpic;
214
    }
215
216
    public String getUsername() {
217
        return username;
218
    }
219
220
    public void setUsername(String username) {
221
        this.username = username;
222
    }
223
224
    public String getChexing() {
225
        return chexing;
226
    }
227
228
    public void setChexing(String chexing) {
229
        this.chexing = chexing;
230
    }
231
232
    public String getFine() {
233
        return fine;
234
    }
235
236
    public void setFine(String fine) {
237
        this.fine = fine;
238
    }
239
240
    public String getCommentsCount() {
241
        return commentsCount;
242
    }
243
244
    public void setCommentsCount(String commentsCount) {
245
        this.commentsCount = commentsCount;
246
    }
247
248
    public String getStarLevel() {
249
        return starLevel;
250
    }
251
252
    public void setStarLevel(String starLevel) {
253
        this.starLevel = starLevel;
254
    }
255
256
    public String getTag() {
257
        return tag;
258
    }
259
260
    public void setTag(String tag) {
261
        this.tag = tag;
262
    }
263
264
    public List<SubcommentBean> getSubcomments() {
265
        return subcomments;
266
    }
267
268
    public void setSubcomments(List<SubcommentBean> subcomments) {
269
        this.subcomments = subcomments;
270
    }
271
272
    public Integer getIsCertifiedOwner() {
273
        return isCertifiedOwner;
274
    }
275
276
    public void setIsCertifiedOwner(Integer isCertifiedOwner) {
277
        this.isCertifiedOwner = isCertifiedOwner;
278
    }
279
280
    public String getTitle() {
281
        return title;
282
    }
283
284
    public void setTitle(String title) {
285
        this.title = title;
286
    }
287
}

+ 153 - 0
app/src/main/java/com/electric/chargingpile/data/SubcommentBean.java

@ -0,0 +1,153 @@
1
package com.electric.chargingpile.data;
2
3
public class SubcommentBean {
4
    private String id;
5
6
    private String ancestorid;
7
8
    private String parentid;
9
10
    private String userid;
11
12
    private String tel;
13
14
    private String hascar;
15
16
    private String zhanid;
17
18
    private String content;
19
20
    private String addtime;
21
22
    private String nickname;
23
24
    private String userpic;
25
26
    private String username;
27
28
    private String child;
29
30
    private String pnickname;
31
32
    private String ptel;
33
34
    public String getId() {
35
        return id;
36
    }
37
38
    public void setId(String id) {
39
        this.id = id;
40
    }
41
42
    public String getAncestorid() {
43
        return ancestorid;
44
    }
45
46
    public void setAncestorid(String ancestorid) {
47
        this.ancestorid = ancestorid;
48
    }
49
50
    public String getParentid() {
51
        return parentid;
52
    }
53
54
    public void setParentid(String parentid) {
55
        this.parentid = parentid;
56
    }
57
58
    public String getUserid() {
59
        return userid;
60
    }
61
62
    public void setUserid(String userid) {
63
        this.userid = userid;
64
    }
65
66
    public String getTel() {
67
        return tel;
68
    }
69
70
    public void setTel(String tel) {
71
        this.tel = tel;
72
    }
73
74
    public String getHascar() {
75
        return hascar;
76
    }
77
78
    public void setHascar(String hascar) {
79
        this.hascar = hascar;
80
    }
81
82
    public String getZhanid() {
83
        return zhanid;
84
    }
85
86
    public void setZhanid(String zhanid) {
87
        this.zhanid = zhanid;
88
    }
89
90
    public String getContent() {
91
        return content;
92
    }
93
94
    public void setContent(String content) {
95
        this.content = content;
96
    }
97
98
    public String getAddtime() {
99
        return addtime;
100
    }
101
102
    public void setAddtime(String addtime) {
103
        this.addtime = addtime;
104
    }
105
106
    public String getNickname() {
107
        return nickname;
108
    }
109
110
    public void setNickname(String nickname) {
111
        this.nickname = nickname;
112
    }
113
114
    public String getUserpic() {
115
        return userpic;
116
    }
117
118
    public void setUserpic(String userpic) {
119
        this.userpic = userpic;
120
    }
121
122
    public String getUsername() {
123
        return username;
124
    }
125
126
    public void setUsername(String username) {
127
        this.username = username;
128
    }
129
130
    public String getChild() {
131
        return child;
132
    }
133
134
    public void setChild(String child) {
135
        this.child = child;
136
    }
137
138
    public String getPnickname() {
139
        return pnickname;
140
    }
141
142
    public void setPnickname(String pnickname) {
143
        this.pnickname = pnickname;
144
    }
145
146
    public String getPtel() {
147
        return ptel;
148
    }
149
150
    public void setPtel(String ptel) {
151
        this.ptel = ptel;
152
    }
153
}

+ 2 - 0
app/src/main/res/layout/activity_chat.xml

@ -22,6 +22,7 @@
22 22
            android:orientation="horizontal">
23 23
24 24
            <TextView
25
                android:visibility="gone"
25 26
                android:id="@+id/act_bar_title_recommend"
26 27
                android:layout_width="wrap_content"
27 28
                android:layout_height="match_parent"
@ -34,6 +35,7 @@
34 35
                android:textSize="18sp" />
35 36
36 37
            <View
38
                android:visibility="gone"
37 39
                android:layout_width="1dp"
38 40
                android:layout_height="15dp"
39 41
                android:background="@color/ui_6d" />

+ 64 - 15
app/src/main/res/layout/activity_single_comment.xml

@ -7,7 +7,7 @@
7 7
    android:layout_width="match_parent"
8 8
    android:layout_height="match_parent"
9 9
    android:background="@color/white"
10
    tools:context="com.electric.chargingpile.activity.SingleCommentActivity">
10
   >
11 11
12 12
    <com.zhy.autolayout.AutoRelativeLayout
13 13
        android:id="@+id/rl_title"
@ -171,7 +171,7 @@
171 171
                    android:layout_alignLeft="@+id/tv_pname"
172 172
                    android:layout_marginTop="10dp"
173 173
                    android:layout_marginRight="15dp"
174
                    android:text=""
174
                    tools:text="sssssssssgin"
175 175
                    android:textAppearance="?android:attr/textAppearanceSmall"
176 176
                    android:textSize="15sp"
177 177
                    android:visibility="visible" />
@ -186,31 +186,75 @@
186 186
                    android:visibility="visible"
187 187
                    zhy:max_select="-1" />
188 188
189
                <ImageView
190
                    android:id="@+id/iv_commentPic"
191
                    android:layout_width="65dp"
192
                    android:layout_height="65dp"
189
                <RelativeLayout
190
                    android:layout_marginTop="10dp"
191
                    android:id="@+id/imgLayout"
193 192
                    android:layout_below="@+id/fl_ptag"
194 193
                    android:layout_alignLeft="@+id/tv_pcontext"
195
                    android:layout_marginTop="10dp"
196
                    android:scaleType="centerCrop"
197
                    android:visibility="gone" />
194
                    android:layout_width="match_parent"
195
                    android:layout_height="wrap_content">
196
                    <ImageView
197
                        tools:visibility="visible"
198
                        android:id="@+id/iv_commentPic"
199
                        android:layout_width="65dp"
200
                        android:layout_height="65dp"
201
                        android:scaleType="centerCrop"
202
                        android:visibility="gone" />
203
                    <ImageView
204
                        android:layout_marginEnd="4dp"
205
                        android:layout_marginStart="4dp"
206
                        android:id="@+id/imgTwo"
207
                        tools:visibility="visible"
208
                        android:layout_width="65dp"
209
                        android:layout_height="65dp"
210
                        android:layout_toRightOf="@+id/iv_commentPic"
211
                        android:scaleType="centerCrop"
212
                        android:visibility="gone" />
213
                    <ImageView
214
                        android:id="@+id/imgThree"
215
                        tools:visibility="visible"
216
                        android:layout_width="65dp"
217
                        android:layout_height="65dp"
218
                        android:layout_toRightOf="@+id/imgTwo"
219
                        android:scaleType="centerCrop"
220
                        android:visibility="gone" />
221
222
                    <ImageView
223
                        tools:visibility="visible"
224
                        android:id="@+id/imgVideo"
225
                        android:layout_width="110dp"
226
                        android:layout_height="62dp"
227
                        android:scaleType="centerCrop"
228
                        android:visibility="gone" />
229
230
                    <ImageView
231
                        android:layout_centerInParent="true"
232
                        android:id="@+id/imgStart"
233
                        android:layout_width="wrap_content"
234
                        android:layout_height="wrap_content"
235
                        android:layout_alignEnd="@+id/imgVideo"
236
                        android:layout_alignParentStart="true"
237
                        android:src="@drawable/app_talk_video_icon"
238
                        android:visibility="gone"
239
                        tools:visibility="visible" />
240
                </RelativeLayout>
198 241
199 242
                <TextView
200 243
                    android:id="@+id/tv_ptime"
201 244
                    android:layout_width="wrap_content"
202 245
                    android:layout_height="wrap_content"
203
                    android:layout_below="@+id/iv_commentPic"
246
                    android:layout_below="@+id/imgLayout"
204 247
                    android:layout_alignStart="@+id/tv_pcontext"
205 248
                    android:layout_alignLeft="@+id/tv_pcontext"
206 249
                    android:layout_marginTop="10dp"
207 250
                    android:layout_marginBottom="8dp"
208
                    android:text=""
251
                    tools:text="2020-04-14"
209 252
                    android:textAppearance="?android:attr/textAppearanceSmall"
210 253
                    android:textColor="#c8c8c8"
211 254
                    android:textSize="12sp" />
212 255
213 256
                <TextView
257
                    tools:visibility="visible"
214 258
                    android:id="@+id/tv_pdelete"
215 259
                    android:layout_width="wrap_content"
216 260
                    android:layout_height="wrap_content"
@ -228,7 +272,7 @@
228 272
                    android:id="@+id/ll_pzan"
229 273
                    android:layout_width="wrap_content"
230 274
                    android:layout_height="wrap_content"
231
                    android:layout_below="@+id/iv_commentPic"
275
                    android:layout_below="@+id/imgLayout"
232 276
                    android:layout_toLeftOf="@+id/tv_preply"
233 277
                    android:paddingLeft="10dp"
234 278
                    android:paddingTop="10dp"
@ -261,7 +305,7 @@
261 305
                    android:id="@+id/tv_preply"
262 306
                    android:layout_width="wrap_content"
263 307
                    android:layout_height="wrap_content"
264
                    android:layout_below="@+id/iv_commentPic"
308
                    android:layout_below="@+id/imgLayout"
265 309
                    android:layout_alignEnd="@+id/tv_pcontext"
266 310
                    android:layout_alignRight="@+id/tv_pcontext"
267 311
                    android:layout_alignParentRight="true"
@ -277,6 +321,7 @@
277 321
278 322
279 323
                <TextView
324
                    tools:visibility="visible"
280 325
                    android:id="@+id/tv_childName"
281 326
                    android:layout_width="wrap_content"
282 327
                    android:layout_height="wrap_content"
@ -289,6 +334,7 @@
289 334
                    android:visibility="gone" />
290 335
291 336
                <TextView
337
                    tools:visibility="visible"
292 338
                    android:id="@+id/textView14"
293 339
                    android:layout_width="wrap_content"
294 340
                    android:layout_height="wrap_content"
@ -301,6 +347,7 @@
301 347
                    android:visibility="gone" />
302 348
303 349
                <TextView
350
                    tools:visibility="visible"
304 351
                    android:id="@+id/tv_parentName"
305 352
                    android:layout_width="wrap_content"
306 353
                    android:layout_height="wrap_content"
@ -313,6 +360,7 @@
313 360
                    android:visibility="gone" />
314 361
315 362
                <TextView
363
                    tools:visibility="visible"
316 364
                    android:id="@+id/tv_commentDetail"
317 365
                    android:layout_width="wrap_content"
318 366
                    android:layout_height="wrap_content"
@ -325,6 +373,7 @@
325 373
                    android:visibility="gone" />
326 374
327 375
                <com.electric.chargingpile.view.MyListView
376
328 377
                    android:id="@+id/lv_scomment"
329 378
                    android:layout_width="match_parent"
330 379
                    android:layout_height="wrap_content"
@ -395,7 +444,7 @@
395 444
                <!--android:background="@color/bg_row"-->
396 445
                <!--android:layout_below="@+id/ll_comment"/>-->
397 446
                <View
398
447
                    tools:visibility="visible"
399 448
                    android:layout_width="match_parent"
400 449
                    android:layout_height="0.5dp"
401 450
                    android:layout_below="@+id/tv_ptime"
@ -656,10 +705,10 @@
656 705
    </LinearLayout>
657 706
658 707
    <RelativeLayout
708
        tools:visibility="visible"
659 709
        android:id="@+id/rl_point"
660 710
        android:layout_width="80dp"
661 711
        android:layout_height="80dp"
662
        android:layout_alignBottom="@+id/sv"
663 712
        android:layout_alignParentBottom="true"
664 713
        android:layout_centerHorizontal="true"
665 714
        android:layout_marginBottom="50dp"

+ 16 - 0
app/src/main/res/layout/activity_video_detail.xml

@ -0,0 +1,16 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent">
7
8
    <com.electric.chargingpile.video.VideoPlayer
9
        android:id="@+id/videoPlayer"
10
        android:layout_width="wrap_content"
11
        android:layout_height="wrap_content"
12
        app:layout_constraintEnd_toEndOf="parent"
13
        app:layout_constraintStart_toStartOf="parent"
14
        app:layout_constraintTop_toTopOf="parent" />
15
16
</androidx.constraintlayout.widget.ConstraintLayout>