hy 2 lat temu
rodzic
commit
43415667a0

+ 11 - 17
app/src/main/java/com/electric/chargingpile/activity/ChargingCommentActivity.java

@ -44,13 +44,17 @@ import androidx.appcompat.app.AppCompatActivity;
44 44
import androidx.recyclerview.widget.GridLayoutManager;
45 45
import androidx.recyclerview.widget.RecyclerView;
46 46
47
import com.andview.refreshview.utils.Utils;
47 48
import com.blankj.utilcode.util.CacheUtils;
48 49
import com.blankj.utilcode.util.EmptyUtils;
49 50
import com.blankj.utilcode.util.LogUtils;
50 51
import com.bumptech.glide.Glide;
51 52
import com.bumptech.glide.load.DataSource;
52 53
import com.bumptech.glide.load.engine.GlideException;
54
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
55
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
53 56
import com.bumptech.glide.request.RequestListener;
57
import com.bumptech.glide.request.RequestOptions;
54 58
import com.bumptech.glide.request.target.Target;
55 59
import com.electric.chargingpile.R;
56 60
import com.electric.chargingpile.adapter.GridImageAdapter;
@ -213,8 +217,6 @@ public class ChargingCommentActivity extends AppCompatActivity implements View.O
213 217
            super.handleMessage(msg);
214 218
        }
215 219
    };
216
    private List<LocalMedia> mSelectionData =new ArrayList<LocalMedia>();
217
218 220
219 221
    private int mInsterType = -1; //1 插入图片 2 插入视频 -1 未插入数据
220 222
@ -254,9 +256,10 @@ public class ChargingCommentActivity extends AppCompatActivity implements View.O
254 256
        findViewById(R.id.imgUpload).setOnClickListener(this);
255 257
        findViewById(R.id.videoUpLoad).setOnClickListener(this);
256 258
        commentHint = (TextView) findViewById(R.id.commentHint);
257
        topicText = (TextView) findViewById(R.id.topicText);
258 259
        imgAd = (ImageView) findViewById(R.id.imgAd);
259 260
        commentHint.setText(Html.fromHtml("30字以上+图片或15s视频有机会被<font color='#3EC34C'>评为优质评论获得充电优惠券</font>", FROM_HTML_MODE_LEGACY));
261
        topicText = (TextView) findViewById(R.id.topicText);
262
        topicText.setText(Html.fromHtml("<font color='#6AB650'>╋</font>  话题", FROM_HTML_MODE_LEGACY));
260 263
261 264
262 265
        rl_comment = (RelativeLayout) findViewById(R.id.rl_comment);
@ -448,21 +451,12 @@ public class ChargingCommentActivity extends AppCompatActivity implements View.O
448 451
        });
449 452
450 453
        if (MainApplication.mAdComment!=null){
454
451 455
            String icon = MainApplication.mAdComment.getIcon();
452 456
            String adUrl = MainApplication.mAdComment.getUrl();
453
            Glide.with(this).load(MainApplication.url + "/zhannew/uploadfile/" + icon).listener(new RequestListener<Drawable>() {
454
                @Override
455
                public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
456
                    imgAd.setVisibility(View.GONE);
457
                    return false;
458
                }
459
460
                @Override
461
                public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
462
                    imgAd.setVisibility(View.VISIBLE);
463
                    return false;
464
                }
465
            }).into(imgAd);
457
            Glide.with(this).load(MainApplication.url + "/zhannew/uploadfile/" + icon)
458
                    .into(imgAd);
459
            imgAd.setVisibility(View.VISIBLE);
466 460
            imgAd.setOnClickListener(v->{
467 461
                Intent adfloatIntent = new Intent(this, MyWebViewActivity.class);
468 462
                adfloatIntent.putExtra("url", adUrl);
@ -514,7 +508,7 @@ public class ChargingCommentActivity extends AppCompatActivity implements View.O
514 508
        } else if (requestCode == REQUEST_TOPIC_CODE && resultCode == SelectTopicActivity.REESULT_CODE) {
515 509
            String name = data.getStringExtra("topicBean");
516 510
            mTopicbean = mGson.fromJson(name, TopicBean.class);
517
            topicText.setText(mTopicbean.getMeg());
511
            topicText.setText(Html.fromHtml("<font color='#6AB650'>#</font>  "+mTopicbean.getMeg(), FROM_HTML_MODE_LEGACY));
518 512
        }
519 513
    }
520 514

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

@ -37,7 +37,7 @@ public class CommentVideoDetailActivity extends AppCompatActivity {
37 37
38 38
    private DetailVideo mVideoPlayer;
39 39
    private ImageView mPlayIcon,mBackIcon;
40
    private ProgressBar mProgressBar;
40
41 41
    private Gson mGson=new Gson();
42 42
    private String pid;
43 43
    private LoadingDialog mLoadingDialog = null ;
@ -63,7 +63,6 @@ public class CommentVideoDetailActivity extends AppCompatActivity {
63 63
        mVideoPlayer = findViewById(R.id.videoPlayer);
64 64
        mBackIcon = findViewById(R.id.backIcon);
65 65
        mPlayIcon = findViewById(R.id.playIcon);
66
        mProgressBar = findViewById(R.id.progressBar);
67 66
68 67
        mBackIcon.setOnClickListener(v->{
69 68
            finish();
@ -121,7 +120,6 @@ public class CommentVideoDetailActivity extends AppCompatActivity {
121 120
        ImageDisplayUtils.dispalyImg(this, url, thumbImageView);
122 121
        mVideoPlayer.setThumbImageView(thumbImageView);
123 122
        mVideoPlayer.setLooping(true);
124
        mVideoPlayer.setGSYVideoProgressListener((progress, secProgress, currentPosition, duration) -> mProgressBar.setProgress(Math.toIntExact(progress)));
125 123
126 124
        mVideoPlayer.setUp(url, true, "");
127 125
        mVideoPlayer.startPlayLogic();

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

@ -447,6 +447,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
447 447
                case 2:
448 448
                    try {
449 449
                        String data = JsonUtils.getKeyResult(msg.obj.toString(), "data");
450
                        Log.e(TAG, "handleMessage: "+data );
450 451
                        if (!data.equals("")) {
451 452
                            String ad_comment = JsonUtils.getKeyResult(data, "ad_comment");
452 453
                            if (EmptyUtils.isNotEmpty(ad_comment)){

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

@ -100,7 +100,6 @@ public class SelectTopicActivity  extends AppCompatActivity {
100 100
                        String data = JsonUtils.getKeyResult(response, "data");
101 101
                        ArrayList<TopicBean> list = mGson.fromJson(data, new TypeToken<ArrayList<TopicBean>>() {
102 102
                        }.getType());
103
                        list.clear();
104 103
                        if (list != null && list.size()>0){
105 104
                            mAdapter.setDatas(list);
106 105
                            mRecyclerView.setVisibility(View.VISIBLE);
@ -111,7 +110,15 @@ public class SelectTopicActivity  extends AppCompatActivity {
111 110
                            noDataText.setVisibility(View.VISIBLE);
112 111
                            imgNoData.setVisibility(View.VISIBLE);
113 112
                        }
113
                    }else{
114
                        mRecyclerView.setVisibility(View.GONE);
115
                        noDataText.setVisibility(View.VISIBLE);
116
                        imgNoData.setVisibility(View.VISIBLE);
114 117
                    }
118
                }else{
119
                    mRecyclerView.setVisibility(View.GONE);
120
                    noDataText.setVisibility(View.VISIBLE);
121
                    imgNoData.setVisibility(View.VISIBLE);
115 122
                }
116 123
117 124
            }

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

@ -53,6 +53,7 @@ import com.zhy.view.flowlayout.TagFlowLayout;
53 53
import org.json.JSONArray;
54 54
import org.json.JSONException;
55 55
import org.json.JSONObject;
56
import org.w3c.dom.Text;
56 57
57 58
import java.net.URLEncoder;
58 59
import java.util.ArrayList;
@ -149,7 +150,7 @@ public class SingleCommentActivity extends Activity implements View.OnClickListe
149 150
    public void getCommentData(RankinglistRefreshEvent rankinglistRefreshEvent) {
150 151
//        String url = "http://59.110.68.162/zhannew/basic/web/index.php/tpappcomments/get-sub-comments?id="+pid;
151 152
        String url = MainApplication.url + "/zhannew/basic/web/index.php/tpappcomments/get-sub-comments?id=" + pid;
152
        Log.e("getCommentData_url=", url);
153
//        Log.e("getCommentData_url=", url);
153 154
        OkHttpUtils.get().url(url).build().execute(new StringCallback() {
154 155
            @Override
155 156
            public void onError(Call call, Exception e) {
@ -239,12 +240,19 @@ public class SingleCommentActivity extends Activity implements View.OnClickListe
239 240
        }
240 241
        //设置时间
241 242
        String addtime = JsonUtils.getKeyResult(data, "addtime");
243
        addtime= TextUtils.isEmpty(addtime)?"0":addtime;
242 244
        tv_ptime.setText(TimeStamp2Date(addtime, "yyyy-MM-dd"));
243 245
        //设置内容
244 246
        String content = JsonUtils.getKeyResult(data, "content");
247
        String  theme= JsonUtils.getKeyResult(data,"theme");
248
        if (!TextUtils.isEmpty(theme.trim())){
249
            content= "#"+theme+"#"+content;
250
        }
251
245 252
        if (content.equals("") || content.equals(" ")) {
246 253
            tv_pcontext.setVisibility(View.GONE);
247 254
        } else {
255
248 256
            tv_pcontext.setVisibility(View.VISIBLE);
249 257
            SpannableString ss = new SpannableString(content);
250 258
            Pattern pattern = Pattern.compile("#[0-9a-zA-Z,\\u4e00-\\u9fa5]+#");
@ -252,7 +260,7 @@ public class SingleCommentActivity extends Activity implements View.OnClickListe
252 260
            while (matcher.find()) {
253 261
                int start = matcher.start();
254 262
                int end = matcher.end();
255
                ss.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.topic_blue)), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
263
                ss.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.topic_green)), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
256 264
            }
257 265
            tv_pcontext.setText(ss);
258 266
        }

+ 12 - 16
app/src/main/java/com/electric/chargingpile/activity/ZhanCommentActivity.java

@ -22,6 +22,7 @@ import android.util.Base64;
22 22
import android.util.Log;
23 23
import android.view.LayoutInflater;
24 24
import android.view.View;
25
import android.view.ViewGroup;
25 26
import android.view.animation.AnimationUtils;
26 27
import android.view.inputmethod.InputMethodManager;
27 28
import android.widget.ImageView;
@ -36,11 +37,15 @@ import androidx.appcompat.app.AppCompatActivity;
36 37
import androidx.recyclerview.widget.GridLayoutManager;
37 38
import androidx.recyclerview.widget.RecyclerView;
38 39
40
import com.andview.refreshview.utils.Utils;
39 41
import com.blankj.utilcode.util.CacheUtils;
40 42
import com.bumptech.glide.Glide;
41 43
import com.bumptech.glide.load.DataSource;
42 44
import com.bumptech.glide.load.engine.GlideException;
45
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
46
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
43 47
import com.bumptech.glide.request.RequestListener;
48
import com.bumptech.glide.request.RequestOptions;
44 49
import com.bumptech.glide.request.target.Target;
45 50
import com.electric.chargingpile.R;
46 51
import com.electric.chargingpile.adapter.GridImageAdapter;
@ -85,6 +90,7 @@ import com.upyun.library.common.SerialUploader;
85 90
import com.upyun.library.common.UploadEngine;
86 91
import com.upyun.library.listener.UpCompleteListener;
87 92
import com.upyun.library.listener.UpProgressListener;
93
import com.zhy.autolayout.AutoLinearLayout;
88 94
import com.zhy.http.okhttp.OkHttpUtils;
89 95
import com.zhy.http.okhttp.callback.StringCallback;
90 96
import com.zhy.view.flowlayout.FlowLayout;
@ -431,25 +437,14 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
431 437
        if (MainApplication.mAdComment!=null){
432 438
            String icon = MainApplication.mAdComment.getIcon();
433 439
            String adUrl = MainApplication.mAdComment.getUrl();
434
            Glide.with(this).load(MainApplication.url + "/zhannew/uploadfile/" + icon).listener(new RequestListener<Drawable>() {
435
                @Override
436
                public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
437
                    imgAd.setVisibility(View.GONE);
438
                    return false;
439
                }
440
441
                @Override
442
                public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
443
                    imgAd.setVisibility(View.VISIBLE);
444
                    return false;
445
                }
446
            }).into(imgAd);
440
            Glide.with(this).load(MainApplication.url + "/zhannew/uploadfile/" + icon)
441
                    .into(imgAd);
442
            imgAd.setVisibility(View.VISIBLE);
447 443
            imgAd.setOnClickListener(v->{
448 444
                Intent adfloatIntent = new Intent(this, MyWebViewActivity.class);
449 445
                adfloatIntent.putExtra("url", adUrl);
450 446
                startActivity(adfloatIntent);
451 447
            });
452
453 448
        }
454 449
455 450
    }
@ -546,7 +541,8 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
546 541
        } else if (requestCode == REQUEST_TOPIC_CODE && resultCode == SelectTopicActivity.REESULT_CODE) {
547 542
            String name = data.getStringExtra("topicBean");
548 543
            mTopicbean = mGson.fromJson(name, TopicBean.class);
549
            topicText.setText(mTopicbean.getMeg());
544
            topicText.setText(Html.fromHtml("<font color='#6AB650'>#</font>  "+mTopicbean.getMeg(), FROM_HTML_MODE_LEGACY));
545
550 546
        }
551 547
552 548
    }
@ -618,7 +614,7 @@ public class ZhanCommentActivity extends AppCompatActivity implements View.OnCli
618 614
    private void getDatas() {
619 615
        zhan_id = getIntent().getStringExtra("zhan_id");
620 616
        show_txt = getIntent().getStringExtra("show_txt");
621
        et_pinglun.setHint(show_txt);
617
//        et_pinglun.setHint(show_txt);
622 618
    }
623 619
624 620
    private void addComment(ArrayList<String> fileUrlList, String thumUrl) throws Exception {

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

@ -38,6 +38,8 @@ import com.nostra13.universalimageloader.core.DisplayImageOptions;
38 38
import com.nostra13.universalimageloader.core.ImageLoader;
39 39
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
40 40
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
41
import com.shuyu.gsyvideoplayer.GSYVideoManager;
42
import com.shuyu.gsyvideoplayer.model.VideoOptionModel;
41 43
import com.tencent.bugly.crashreport.CrashReport;
42 44
import com.zhy.http.okhttp.OkHttpUtils;
43 45
import com.zhy.http.okhttp.callback.StringCallback;
@ -58,6 +60,7 @@ import java.util.Map;
58 60

59 61
import cn.jpush.android.api.JPushInterface;
60 62
import okhttp3.Call;
63
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
61 64

62 65

63 66
public class MainApplication extends MultiDexApplication {
@ -207,6 +210,13 @@ public class MainApplication extends MultiDexApplication {
207 210
        if (ProfileManager.getInstance().getPrivacyAgreement(this)) {
208 211
            MainApplication.initSDK();
209 212
        }
213

214
        //防止进度跳转不准确
215
        VideoOptionModel videoOptionModel =
216
               new VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "enable-accurate-seek", 1);
217
        ArrayList<VideoOptionModel> list =new ArrayList<VideoOptionModel>();
218
        list.add(videoOptionModel);
219
        GSYVideoManager.instance().setOptionModelList(list);
210 220
    }
211 221

212 222
    public void initJPush() {

+ 55 - 1
app/src/main/java/com/electric/chargingpile/fragment/DetailsFragment.java

@ -1405,13 +1405,17 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
1405 1405
                                    Glide.with(MainApplication.context)
1406 1406
                                            .load(MainApplication.CDN +thumUrl)
1407 1407
                                            .into(imgVideo);
1408
                                }
1409 1408
1409
                                    imgVideo.setOnClickListener(v->{
1410
                                        CommentVideoDetailActivity.actioinStart(getContext(),jsonObject.optString("id"));
1411
                                    });
1412
                                }
1410 1413
                            }else {
1411 1414
1412 1415
                                imgVideo.setVisibility(View.GONE);
1413 1416
                                imgStart.setVisibility(View.GONE);
1414 1417
1418
1415 1419
                                if (!fileUrl.equals("")) {
1416 1420
                                    iv_commentPic.setVisibility(View.VISIBLE);
1417 1421
                                    imgLayout.setVisibility(View.VISIBLE);
@ -1440,6 +1444,56 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
1440 1444
                                } else {
1441 1445
                                    imgThree.setVisibility(View.GONE);
1442 1446
                                }
1447
1448
1449
                                String[] fileUrlArray = null;
1450
                                if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url) &&!TextUtils.isEmpty(file3Url)){
1451
                                    fileUrlArray =new String[]{
1452
                                            MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
1453
                                            MainApplication.url + "/zhannew/uploadfile/"+file2Url,
1454
                                            MainApplication.url + "/zhannew/uploadfile/"+file3Url
1455
                                    };
1456
                                }else  if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url)){
1457
                                    fileUrlArray =new String[]{
1458
                                            MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
1459
                                            MainApplication.url + "/zhannew/uploadfile/"+file2Url
1460
                                    };
1461
                                }else  if (!TextUtils.isEmpty(fileUrl)){
1462
                                    fileUrlArray =new String[]{ MainApplication.url + "/zhannew/uploadfile/"+fileUrl};
1463
                                }
1464
1465
1466
                                String[] finalFileUrlArray = fileUrlArray;
1467
                                iv_commentPic.setOnClickListener(new View.OnClickListener() {
1468
                                    @Override
1469
                                    public void onClick(View v) {
1470
                                        Intent intent = new Intent(getContext(), ImagePagerActivity.class);
1471
                                        // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
1472
                                        intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
1473
                                        intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
1474
                                        startActivity(intent);
1475
                                    }
1476
                                });
1477
                                imgTwo.setOnClickListener(new View.OnClickListener() {
1478
                                    @Override
1479
                                    public void onClick(View v) {
1480
                                        Intent intent = new Intent(getContext(), ImagePagerActivity.class);
1481
                                        // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
1482
                                        intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
1483
                                        intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 1);
1484
                                        startActivity(intent);
1485
                                    }
1486
                                });
1487
                                imgThree.setOnClickListener(new View.OnClickListener() {
1488
                                    @Override
1489
                                    public void onClick(View v) {
1490
                                        Intent intent = new Intent(getContext(), ImagePagerActivity.class);
1491
                                        // 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
1492
                                        intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
1493
                                        intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 2);
1494
                                        startActivity(intent);
1495
                                    }
1496
                                });
1443 1497
                            }
1444 1498
                            //父级评分
1445 1499
                            String grade = jsonObject.optString("star_level");

+ 2 - 11
app/src/main/java/com/electric/chargingpile/fragment/NewMyMessageFragment.java

@ -87,7 +87,7 @@ public class NewMyMessageFragment extends Fragment {
87 87
    }
88 88
89 89
    private void sp() {
90
        SharedPreferences sharedPreferences = getActivity().getSharedPreferences("userInfo",
90
        SharedPreferences sharedPreferences = MainApplication.context.getSharedPreferences("userInfo",
91 91
                Activity.MODE_PRIVATE);
92 92
        password = sharedPreferences.getString("password", "");
93 93
        username = sharedPreferences.getString("yonghuming", "");
@ -135,17 +135,8 @@ public class NewMyMessageFragment extends Fragment {
135 135
                                for (int j = 0; j < jsonArray.length(); j++) {
136 136
                                    JSONObject jsonObject4 = (JSONObject) jsonArray
137 137
                                            .opt(j);
138
                                    String is_play = TextUtils.isEmpty( jsonObject4.getString("is_play"))?"": jsonObject4.getString("is_play")  ; //0 审核未通过 item隐藏,1 审核通过,item显示
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{
145
                                        datas.add(jsonObject4);
146
                                    }
138
                                    datas.add(jsonObject4);
147 139
                                }
148
                                Log.d("comments_size", datas.size() + "");
149 140
                                if (datas.size() == 0) {
150 141
                                    web_content.setVisibility(View.GONE);
151 142
                                    ll_tishi.setVisibility(View.VISIBLE);

+ 20 - 18
app/src/main/java/com/electric/chargingpile/video/DetailVideo.java

@ -3,10 +3,13 @@ package com.electric.chargingpile.video;
3 3
import android.content.Context;
4 4
import android.util.AttributeSet;
5 5
import android.view.MotionEvent;
6
import android.widget.ImageView;
6 7
7 8
import com.electric.chargingpile.R;
8 9
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
9 10
11
import moe.codeest.enviews.ENPlayView;
12
10 13
public class DetailVideo extends StandardGSYVideoPlayer {
11 14
12 15
@ -30,6 +33,7 @@ public class DetailVideo extends StandardGSYVideoPlayer {
30 33
    }
31 34
32 35
36
33 37
    @Override
34 38
    protected void touchSurfaceMoveFullLogic(float absDeltaX, float absDeltaY) {
35 39
        super.touchSurfaceMoveFullLogic(absDeltaX, absDeltaY);
@ -60,27 +64,26 @@ public class DetailVideo extends StandardGSYVideoPlayer {
60 64
    protected void changeUiToPreparingShow() {
61 65
        super.changeUiToPreparingShow();
62 66
        setViewShowState(mTopContainer, INVISIBLE);
63
        setViewShowState(mBottomContainer, INVISIBLE);
64 67
        setViewShowState(mLoadingProgressBar, INVISIBLE);
65
        setViewShowState(mStartButton, INVISIBLE);
68
66 69
    }
67 70
68 71
    @Override
69 72
    protected void changeUiToPlayingBufferingShow() {
70 73
        super.changeUiToPlayingBufferingShow();
71 74
        setViewShowState(mTopContainer, INVISIBLE);
72
        setViewShowState(mBottomContainer, INVISIBLE);
75
73 76
        setViewShowState(mLoadingProgressBar, INVISIBLE);
74
        setViewShowState(mStartButton, INVISIBLE);
77
75 78
    }
76 79
77 80
    @Override
78 81
    protected void changeUiToPlayingShow() {
79 82
        super.changeUiToPlayingShow();
80 83
        setViewShowState(mTopContainer, INVISIBLE);
81
        setViewShowState(mBottomContainer, INVISIBLE);
84
82 85
        setViewShowState(mLoadingProgressBar, INVISIBLE);
83
        setViewShowState(mStartButton, INVISIBLE);
86
84 87
85 88
    }
86 89
@ -88,53 +91,52 @@ public class DetailVideo extends StandardGSYVideoPlayer {
88 91
    protected void changeUiToCompleteShow() {
89 92
        super.changeUiToCompleteShow();
90 93
        setViewShowState(mTopContainer, INVISIBLE);
91
        setViewShowState(mBottomContainer, INVISIBLE);
94
92 95
        setViewShowState(mLoadingProgressBar, INVISIBLE);
93
        setViewShowState(mStartButton, INVISIBLE);
96
94 97
    }
95 98
96 99
    @Override
97 100
    protected void changeUiToPauseShow() {
98 101
        super.changeUiToPauseShow();
99 102
        setViewShowState(mTopContainer, INVISIBLE);
100
        setViewShowState(mBottomContainer, INVISIBLE);
103
101 104
        setViewShowState(mLoadingProgressBar, INVISIBLE);
102
        setViewShowState(mStartButton, INVISIBLE);
105
103 106
    }
104 107
105 108
    @Override
106 109
    protected void changeUiToNormal() {
107 110
        super.changeUiToNormal();
108 111
        setViewShowState(mTopContainer, INVISIBLE);
109
        setViewShowState(mBottomContainer, INVISIBLE);
112
110 113
        setViewShowState(mLoadingProgressBar, INVISIBLE);
111
        setViewShowState(mStartButton, INVISIBLE);
114
112 115
    }
113 116
114 117
    @Override
115 118
    public void startAfterPrepared() {
116 119
        super.startAfterPrepared();
117 120
        setViewShowState(mTopContainer, INVISIBLE);
118
        setViewShowState(mBottomContainer, INVISIBLE);
121
119 122
        setViewShowState(mLoadingProgressBar, INVISIBLE);
120
        setViewShowState(mStartButton, INVISIBLE);
123
121 124
    }
122 125
123 126
    @Override
124 127
    protected void changeUiToPlayingBufferingClear() {
125 128
        super.changeUiToPlayingBufferingClear();
126 129
        setViewShowState(mTopContainer, INVISIBLE);
127
        setViewShowState(mBottomContainer, INVISIBLE);
130
128 131
        setViewShowState(mLoadingProgressBar, INVISIBLE);
129
        setViewShowState(mStartButton, INVISIBLE);
132
130 133
    }
131 134
132 135
    @Override
133 136
    protected void changeTextureViewShowType() {
134 137
        super.changeTextureViewShowType();
135 138
        setViewShowState(mTopContainer, INVISIBLE);
136
        setViewShowState(mBottomContainer, INVISIBLE);
137 139
        setViewShowState(mLoadingProgressBar, INVISIBLE);
138
        setViewShowState(mStartButton, INVISIBLE);
140
139 141
    }
140 142
}

+ 3 - 1
app/src/main/res/layout/activity_charging_comment.xml

@ -183,7 +183,7 @@
183 183
                android:paddingTop="12dp"
184 184
                android:paddingBottom="12dp"
185 185
                android:background="@color/white"
186
                android:hint="对本次充电感受如何?跟其他车友分享一下吧~"
186
                android:hint="有什么想吐槽的吗?来跟其他车友分享一下吧~"
187 187
                android:textColorHint="@color/ui_68"
188 188
                android:textColor="@color/ui_62"
189 189
                android:textSize="13sp"
@ -249,6 +249,8 @@
249 249
                />
250 250
251 251
            <ImageView
252
                android:layout_marginEnd="12dp"
253
                android:layout_marginStart="12dp"
252 254
                android:visibility="gone"
253 255
                android:id="@+id/imgAd"
254 256
                android:layout_marginTop="30dp"

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

@ -1542,7 +1542,7 @@
1542 1542
                android:layout_height="34dp"
1543 1543
                android:gravity="center"
1544 1544
                tools:text="您有一笔订,点击查看详情..."
1545
                android:textColor="@color/huimain"
1545
                android:textColor="#FA1C1C"
1546 1546
                android:textSize="13sp" />
1547 1547
1548 1548
            <ImageView

+ 1 - 13
app/src/main/res/layout/activity_video_detail.xml

@ -24,19 +24,7 @@
24 24
        app:layout_constraintEnd_toEndOf="@+id/videoPlayer"
25 25
        app:layout_constraintStart_toStartOf="@+id/videoPlayer"
26 26
        app:layout_constraintTop_toTopOf="@+id/videoPlayer" />
27
    <!-- 自定义进度条 -->
28
    <ProgressBar
29
        app:layout_constraintEnd_toEndOf="parent"
30
        app:layout_constraintStart_toStartOf="parent"
31
        android:layout_marginBottom="10dp"
32
        app:layout_constraintBottom_toBottomOf="parent"
33
        android:id="@+id/progressBar"
34
        style="@android:style/Widget.ProgressBar.Horizontal"
35
        android:layout_width="match_parent"
36
        android:layout_height="1dp"
37
        android:max="100"
38
        android:progressDrawable="@drawable/video_player_progressbar"
39
        tools:progress="50" />
27
40 28
    <ImageView
41 29
        android:layout_marginTop="25dp"
42 30
        app:layout_constraintTop_toTopOf="parent"

+ 3 - 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"
@ -258,6 +258,8 @@
258 258
                />
259 259
260 260
            <ImageView
261
                android:layout_marginEnd="12dp"
262
                android:layout_marginStart="12dp"
261 263
                android:visibility="gone"
262 264
                android:id="@+id/imgAd"
263 265
                android:layout_marginTop="30dp"

+ 91 - 8
app/src/main/res/layout/layout_video_detail.xml

@ -14,10 +14,90 @@
14 14
    </FrameLayout>
15 15
16 16
17
    <RelativeLayout
18
        android:id="@+id/thumb"
19
        android:layout_width="match_parent"
20
        android:layout_height="match_parent"
21
        android:layout_alignParentStart="true"
22
        android:layout_alignParentLeft="true"
23
        android:layout_alignParentTop="true"
24
        android:layout_alignParentEnd="true"
25
        android:layout_alignParentRight="true"
26
        android:layout_alignParentBottom="true"
27
        android:background="#000000"
28
        android:scaleType="fitCenter" />
17 29
30
    <LinearLayout
31
        android:id="@+id/layout_bottom"
32
        android:layout_width="match_parent"
33
        android:layout_height="40dp"
34
        android:layout_alignParentBottom="true"
35
        android:background="#99000000"
36
        android:gravity="center_vertical"
37
        android:orientation="horizontal"
38
        android:visibility="invisible"
39
        tools:visibility="visible">
40
        <ImageView
41
            tools:src="@drawable/video_click_pause_selector"
42
            android:layout_marginStart="10dp"
43
            android:id="@+id/start"
44
            android:layout_width="30dp"
45
            android:layout_height="30dp"
46
            android:layout_centerHorizontal="true"
47
            android:layout_centerVertical="true"
48
            android:layout_gravity="center_vertical" />
18 49
19
    <moe.codeest.enviews.ENDownloadView
50
        <TextView
51
            android:id="@+id/current"
52
            android:layout_width="wrap_content"
53
            android:layout_height="wrap_content"
54
            android:layout_marginLeft="16dp"
55
            android:text="00:00"
56
            android:textColor="#ffffff" />
20 57
58
        <SeekBar
59
            android:id="@+id/progress"
60
            android:layout_width="0dp"
61
            android:layout_height="wrap_content"
62
            android:layout_gravity="center_vertical"
63
            android:layout_weight="1.0"
64
            android:background="@null"
65
            android:max="100"
66
            android:maxHeight="4dp"
67
            android:minHeight="4dp"
68
            android:paddingTop="8dp"
69
            android:paddingBottom="8dp"
70
            android:progressDrawable="@drawable/video_seek_progress"
71
            android:thumb="@drawable/video_seek_thumb" />
72
73
        <TextView
74
            android:id="@+id/total"
75
            android:layout_width="wrap_content"
76
            android:layout_height="wrap_content"
77
            android:layout_marginRight="16dp"
78
            android:text="00:00"
79
            android:textColor="#ffffff" />
80
    </LinearLayout>
81
82
    <ProgressBar
83
        android:id="@+id/bottom_progressbar"
84
        style="?android:attr/progressBarStyleHorizontal"
85
        android:layout_width="match_parent"
86
        android:layout_height="1.5dp"
87
        android:layout_alignParentBottom="true"
88
        android:max="100"
89
        android:progressDrawable="@drawable/video_progress"
90
        tools:visibility="visible" />
91
92
    <ImageView
93
        android:id="@+id/back_tiny"
94
        android:layout_width="24dp"
95
        android:layout_height="24dp"
96
        android:layout_marginLeft="6dp"
97
        android:layout_marginTop="6dp"
98
        android:visibility="gone" />
99
100
    <moe.codeest.enviews.ENDownloadView
21 101
        android:id="@+id/loading"
22 102
        android:layout_width="28dp"
23 103
        android:layout_height="28dp"
@ -25,14 +105,17 @@
25 105
        android:layout_centerVertical="true"
26 106
        android:visibility="invisible" />
27 107
28
    <moe.codeest.enviews.ENPlayView
29
        android:id="@+id/start"
30
        android:layout_width="60dp"
31
        android:layout_height="60dp"
32
        android:layout_centerHorizontal="true"
33
        android:layout_centerVertical="true"
34
        android:layout_gravity="center_vertical" />
35 108
36 109
110
    <ImageView
111
        android:id="@+id/small_close"
112
        android:layout_width="30dp"
113
        android:layout_height="30dp"
114
        android:paddingLeft="10dp"
115
        android:paddingTop="10dp"
116
        android:scaleType="centerInside"
117
        android:src="@drawable/video_small_close"
118
        android:visibility="gone" />
119
37 120
38 121
</RelativeLayout>