s="lines-num lines-num-old"> 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>

Zaloguj się - Gogs: Go Git Service

Zaloguj się

Zapomniałeś hasła?