7L122">122
                    android:textSize="12sp"
123
                    />
134
                   </LinearLayout>
135
                   <LinearLayout
136
                       android:padding="14dp"
137
                       android:layout_width="match_parent"
138
                       android:layout_height="wrap_content">
139
                       <TextView
140
                           android:layout_gravity="center_vertical"
141
                           android:layout_width="wrap_content"
142
                           android:layout_height="wrap_content"
143
                           android:text="●"
144
                           android:textColor="@color/color_707070"
145
                           android:textSize="4dp"
146
                           />
124 147
125
            </LinearLayout>
126
            <LinearLayout
127
                android:padding="14dp"
128
                android:layout_width="match_parent"
129
                android:layout_height="wrap_content">
130
                <TextView
131
                    android:layout_gravity="center_vertical"
132
                    android:layout_width="wrap_content"
133
                    android:layout_height="wrap_content"
134
                    android:text="●"
135
                    android:textColor="@color/color_707070"
136
                    android:textSize="4dp"
137
                    />
148
                       <TextView
149
                           android:layout_width="wrap_content"
150
                           android:layout_height="wrap_content"
151
                           android:layout_marginStart="6dp"
152
                           android:text="您的账号如果有余额请先完成退款或联系客服清空赠送金额"
153
                           android:textColor="@color/color_707070"
154
                           android:textSize="12sp" />
138 155
139
                <TextView
140
                    android:layout_width="wrap_content"
141
                    android:layout_height="wrap_content"
142
                    android:layout_marginStart="6dp"
143
                    android:text="您的账号如果有余额请先完成退款或联系客服清空赠送金额"
144
                    android:textColor="@color/color_707070"
145
                    android:textSize="12sp" />
156
                   </LinearLayout>
157
                   <LinearLayout
158
                       android:padding="14dp"
159
                       android:layout_width="match_parent"
160
                       android:layout_height="wrap_content">
161
                       <TextView
162
                           android:layout_gravity="center_vertical"
163
                           android:layout_width="wrap_content"
164
                           android:layout_height="wrap_content"
165
                           android:text="●"
166
                           android:textColor="@color/color_707070"
167
                           android:textSize="4dp"
168
                           />
146 169
147
            </LinearLayout>
148
            <LinearLayout
149
                android:padding="14dp"
150
                android:layout_width="match_parent"
151
                android:layout_height="wrap_content">
152
                <TextView
153
                    android:layout_gravity="center_vertical"
154
                    android:layout_width="wrap_content"
155
                    android:layout_height="wrap_content"
156
                    android:text="●"
157
                    android:textColor="@color/color_707070"
158
                    android:textSize="4dp"
159
                    />
170
                       <TextView
171
                           android:layout_width="wrap_content"
172
                           android:layout_height="wrap_content"
173
                           android:layout_marginStart="6dp"
174
                           android:text="余额是否为0"
175
                           android:textColor="@color/color_707070"
176
                           android:textSize="12sp" />
160 177
161
                <TextView
162
                    android:layout_width="wrap_content"
163
                    android:layout_height="wrap_content"
164
                    android:layout_marginStart="6dp"
165
                    android:text="余额是否为0"
166
                    android:textColor="@color/color_707070"
167
                    android:textSize="12sp" />
178
                   </LinearLayout>
179
                   <View
180
                       android:background="@color/color_f5f6f7"
181
                       android:layout_marginEnd="14dp"
182
                       android:layout_marginStart="14dp"
183
                       android:layout_width="match_parent"
184
                       android:layout_height="1dp"/>
168 185
169
            </LinearLayout>
170
            <View
171
                android:background="@color/color_f5f6f7"
172
                android:layout_marginEnd="14dp"
173
                android:layout_marginStart="14dp"
174
                android:layout_width="match_parent"
175
                android:layout_height="1dp"/>
186
                   <TextView
187
                       android:padding="14dp"
188
                       android:layout_width="match_parent"
189
                       android:layout_height="wrap_content"
190
                       android:text="注销提交后冻结账号15天,15天后自动注销账号,将清除账号所有相关信息和记录。冻结期内不可使用APP功能,可取消注销。"
191
                       android:textColor="#ff707070"
192
                       android:textSize="12sp"
193
                       />
194
               </LinearLayout>
195
           </LinearLayout>
176 196
177
            <TextView
178
                android:padding="14dp"
179
                android:layout_width="match_parent"
180
                android:layout_height="wrap_content"
181
                android:text="注销提交后冻结账号15天,15天后自动注销账号,将清除账号所有相关信息和记录。冻结期内不可使用APP功能,可取消注销。"
182
                android:textColor="#ff707070"
183
                android:textSize="12sp"
184
                />
185
        </LinearLayout>
186
    </LinearLayout>
197
           <LinearLayout
198
               tools:visibility="visible"
199
               android:visibility="gone"
200
               android:id="@+id/unRegisterLayout"
201
               android:orientation="vertical"
202
               android:layout_width="match_parent"
203
               android:layout_height="wrap_content">
204
               <ImageView
205
                   android:layout_marginTop="40dp"
206
                   android:layout_gravity="center_horizontal"
207
                   android:src="@drawable/ic_logout_hint2"
208
                   android:layout_width="wrap_content"
209
                   android:layout_height="wrap_content"/>
210
               <TextView
211
                   android:id="@+id/nameTitle"
212
                   android:layout_gravity="center"
213
                   android:layout_marginTop="30dp"
214
                   android:layout_width="wrap_content"
215
                   android:layout_height="wrap_content"
216
                   android:textColor="@color/color_0e0e0e"
217
                   android:textSize="21sp"
218
                   />
187 219
188
    <LinearLayout
189
        android:visibility="gone"
190
        android:id="@+id/unRegisterLayout"
191
        android:orientation="vertical"
192
        android:layout_width="match_parent"
193
        android:layout_height="wrap_content">
194
        <ImageView
195
            android:layout_marginTop="40dp"
196
            android:layout_gravity="center_horizontal"
197
            android:src="@drawable/ic_logout_hint2"
198
            android:layout_width="wrap_content"
199
            android:layout_height="wrap_content"/>
200
        <TextView
201
            android:layout_gravity="center"
202
            android:layout_marginTop="30dp"
203
            android:layout_width="wrap_content"
204
            android:layout_height="wrap_content"
205
            android:text="注销正在审核中…"
206
            android:textColor="@color/color_0e0e0e"
207
            android:textSize="21sp"
208
            />
220
               <TextView
221
                   android:id="@+id/addTime"
222
                   android:layout_marginTop="20dp"
223
                   android:layout_gravity="center"
224
                   android:layout_width="wrap_content"
225
                   android:layout_height="wrap_content"
226
                   tools:text="提交时间:2021-8-16  17:00"
227
                   android:textColor="@color/app_color_9b"
228
                   android:textSize="12sp"
229
                   />
230
               <TextView
231
                   android:layout_marginEnd="20dp"
232
                   android:layout_marginStart="20dp"
233
                   android:layout_marginTop="20dp"
234
                   android:layout_gravity="center"
235
                   android:layout_width="wrap_content"
236
                   android:layout_height="wrap_content"
237
                   android:text="您的账号已提交注销申请,账号将冻结15天,冻结期内可登录APP撤销申请,不可使用APP功能,将在15天后正式注销账号,清除账号相关信息。"
238
                   android:textColor="#ff0e0e0e"
239
                   android:textSize="12sp"
240
                   />
241
               <TextView
242
                   android:layout_marginEnd="20dp"
243
                   android:layout_marginStart="20dp"
244
                   android:layout_marginTop="20dp"
245
                   android:layout_gravity="center"
246
                   android:layout_width="wrap_content"
247
                   android:layout_height="wrap_content"
248
                   android:text="账号正式注销后,再次注册APP将为新注册账号,已注销的账号信息无法找回。"
249
                   android:textColor="#ff0e0e0e"
250
                   android:textSize="12sp"
251
                   />
252
           </LinearLayout>
209 253
210
        <TextView
211
            android:id="@+id/addTime"
212
            android:layout_marginTop="20dp"
213
            android:layout_gravity="center"
214
            android:layout_width="wrap_content"
215
            android:layout_height="wrap_content"
216
            tools:text="提交时间:2021-8-16  17:00"
217
            android:textColor="@color/app_color_9b"
218
            android:textSize="12sp"
219
            />
220
        <TextView
221
            android:layout_marginEnd="20dp"
222
            android:layout_marginStart="20dp"
223
            android:layout_marginTop="20dp"
224
            android:layout_gravity="center"
225
            android:layout_width="wrap_content"
226
            android:layout_height="wrap_content"
227
            android:text="您的账号已提交注销申请,账号将冻结15天,冻结期内可登录APP撤销申请,不可使用APP功能,将在15天后正式注销账号,清除账号相关信息。"
228
            android:textColor="#ff0e0e0e"
229
            android:textSize="12sp"
230
            />
231
        <TextView
232
            android:layout_marginEnd="20dp"
233
            android:layout_marginStart="20dp"
234
            android:layout_marginTop="20dp"
235
            android:layout_gravity="center"
236
            android:layout_width="wrap_content"
237
            android:layout_height="wrap_content"
238
            android:text="账号正式注销后,再次注册APP将为新注册账号,已注销的账号信息无法找回。"
239
            android:textColor="#ff0e0e0e"
240
            android:textSize="12sp"
241
            />
242
    </LinearLayout>
243
    <View
244
        android:layout_weight="1"
245
        android:layout_width="match_parent"
246
        android:layout_height="0dp"/>
247
    <TextView
248
        android:id="@+id/text"
249
        android:layout_marginBottom="40dp"
250
        android:layout_marginEnd="12dp"
251
        android:layout_marginStart="12dp"
252
        android:gravity="center"
253
        android:textColor="@color/white"
254
        android:text="退出登录"
255
        android:background="@drawable/bg_raduis_20_lvse"
256
        android:layout_width="match_parent"
257
        android:layout_height="40dp"/>
254
           <TextView
255
               android:layout_alignParentBottom="true"
256
               android:id="@+id/text"
257
               android:layout_marginBottom="40dp"
258
               android:layout_marginEnd="12dp"
259
               android:layout_marginStart="12dp"
260
               android:gravity="center"
261
               android:textColor="@color/white"
262
               android:text="退出登录"
263
               android:background="@drawable/bg_raduis_20_lvse"
264
               android:layout_width="match_parent"
265
               android:layout_height="40dp"/>
266
       </RelativeLayout>
267
268
   </androidx.core.widget.NestedScrollView>
258 269
</LinearLayout>

fix bug · 6123ab93ee - Gogs: Go Git Service
dxh 7 years ago
parent
commit
6123ab93ee

+ 11 - 9
app/src/main/java/com/electric/chargingpile/activity/PersonalPageActivity.java

@ -87,14 +87,15 @@ public class PersonalPageActivity extends Activity implements View.OnClickListen
87 87
        map.put("limit", "20");
88 88
        if (MainApplication.isLogin()) {
89 89
            map.put("userId", MainApplication.userId);
90
            if(TextUtils.isEmpty(targetUserId)){
90
            if (TextUtils.isEmpty(targetUserId)) {
91 91
                user_edit.setVisibility(View.VISIBLE);
92 92
                map.put("targetUserId", MainApplication.userId);//说明是自己
93
            }
94
            else{
93
            } else {
95 94
                user_edit.setVisibility(View.GONE);
96 95
                map.put("targetUserId", targetUserId);
97 96
            }
97
        }else {
98
            map.put("targetUserId", targetUserId);
98 99
        }
99 100
        OkHttpUtils.get().params(map).url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
100 101
            @Override
@ -158,7 +159,7 @@ public class PersonalPageActivity extends Activity implements View.OnClickListen
158 159
        data_info.setText(qadata.userVo.topicNums + "");
159 160
        if (!"".equals(qadata.userVo.headImgUrl)) {
160 161
            Picasso.with(this)
161
                    .load("http://cdz.evcharge.cc/zhannew/uploadfile/"+qadata.userVo.headImgUrl)
162
                    .load("http://cdz.evcharge.cc/zhannew/uploadfile/" + qadata.userVo.headImgUrl)
162 163
                    .into(new Target() {
163 164
                        @Override
164 165
                        public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom loadedFrom) {
@ -226,12 +227,13 @@ public class PersonalPageActivity extends Activity implements View.OnClickListen
226 227
        waterFallAdapter.setOnRecyclerItemClickListener(new RecyclerItemTypeClickListener() {
227 228
            @Override
228 229
            public void onItemClickListener(int position, int index) {
229
                startActivity(new Intent(PersonalPageActivity.this, TopicDetailsActivity.class).putExtra("topicId", waterFallAdapter.getCurrentData().get(position).topicId+""));
230
                startActivity(new Intent(PersonalPageActivity.this, TopicDetailsActivity.class).putExtra("topicId", waterFallAdapter.getCurrentData().get(position).topicId + ""));
230 231
            }
231 232
        });
232 233
    }
233 234
234 235
    private ChargingShareBean chargingShareBean = new ChargingShareBean();
236
235 237
    @Override
236 238
    public void onClick(View v) {
237 239
        switch (v.getId()) {
@ -246,13 +248,13 @@ public class PersonalPageActivity extends Activity implements View.OnClickListen
246 248
                break;
247 249
            case R.id.iv_more:
248 250
249
                if (!MainApplication.isLogin()){
250
                    startActivity(new Intent(this.getApplicationContext(),LoginActivity.class));
251
                    ToastUtil.showToast(this.getApplicationContext(),"请先登录", Toast.LENGTH_SHORT);
251
                if (!MainApplication.isLogin()) {
252
                    startActivity(new Intent(this.getApplicationContext(), LoginActivity.class));
253
                    ToastUtil.showToast(this.getApplicationContext(), "请先登录", Toast.LENGTH_SHORT);
252 254
                    return;
253 255
                }
254 256
255
                if(null == chargingShareBean.getUrl() || TextUtils.isEmpty(chargingShareBean.getUrl()))
257
                if (null == chargingShareBean.getUrl() || TextUtils.isEmpty(chargingShareBean.getUrl()))
256 258
                    return;
257 259
//                if(null == chargingShareBean){
258 260
//                    getShareData();

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

@ -136,22 +136,22 @@ public class VideoDetaislActivity extends Activity implements View.OnClickListen
136 136
        }
137 137
    }
138 138
139
    @Override
140
    protected void onResume() {
141
        if (videoShowView != null) {
142
            videoShowView.onResume();
143
        }
144
        super.onResume();
145
146
    }
147
148
    @Override
149
    protected void onPause() {
150
        if (videoShowView != null) {
151
            videoShowView.onPause();
152
        }
153
        super.onPause();
154
    }
139
//    @Override
140
//    protected void onResume() {
141
//        if (videoShowView != null) {
142
//            videoShowView.onResume();
143
//        }
144
//        super.onResume();
145
//
146
//    }
147
148
//    @Override
149
//    protected void onPause() {
150
//        if (videoShowView != null) {
151
//            videoShowView.onPause();
152
//        }
153
//        super.onPause();
154
//    }
155 155
156 156
    @Override
157 157
    protected void onStop() {

+ 34 - 26
app/src/main/java/com/electric/chargingpile/fragment/SvVideoShowView.java

@ -42,9 +42,10 @@ import com.squareup.picasso.Picasso;
42 42
import com.zhy.http.okhttp.OkHttpUtils;
43 43
import com.zhy.http.okhttp.callback.StringCallback;
44 44
45
import java.math.RoundingMode;
46
import java.text.NumberFormat;
45 47
import java.util.HashMap;
46 48
import java.util.List;
47
import java.util.Locale;
48 49
import java.util.Map;
49 50
50 51
import cn.sharesdk.framework.Platform;
@ -146,16 +147,15 @@ public class SvVideoShowView implements View.OnClickListener {
146 147
147 148
    private String num4(int num) {
148 149
        String re = "";
149
        if (num < 999) {
150
        if (num < 10000) {
150 151
            re = re + num;
151 152
        } else {
152
            float result = num / 10000;
153
            int sl = num % 10000;
154
            if (sl == 0) {
155
                re = String.format(Locale.CHINESE, "%f", result) + "W";
156
            } else {
157
                re = String.format(Locale.CHINESE, "%.1f", result) + "W";
158
            }
153
            float result = (float) num / 10000;
154
155
            NumberFormat nf = NumberFormat.getInstance();
156
            nf.setRoundingMode(RoundingMode.DOWN);
157
            nf.setMaximumFractionDigits(1);
158
            re = nf.format(result) + "W";
159 159
        }
160 160
        return re;
161 161
    }
@ -287,9 +287,16 @@ public class SvVideoShowView implements View.OnClickListener {
287 287
    private void initPlayer(View view) {
288 288
        playIcon = view.findViewById(R.id.view_show_icon);
289 289
        upVideoView2 = view.findViewById(R.id.view_show_video);
290
        upVideoView2.setOnCompletionListener(new IMediaPlayer.OnCompletionListener() {
291
            @Override
292
            public void onCompletion(IMediaPlayer mp) {
293
                playIcon.setVisibility(View.VISIBLE);
294
            }
295
        });
290 296
        upVideoView2.setOnPreparedListener(new IMediaPlayer.OnPreparedListener() {
291 297
            @Override
292 298
            public void onPrepared(IMediaPlayer mp) {
299
                mp.setLooping(false);
293 300
                int videoWidth = mp.getVideoWidth();
294 301
                int videoHeight = mp.getVideoHeight();
295 302
                if (videoHeight > videoWidth) {
@ -302,15 +309,18 @@ public class SvVideoShowView implements View.OnClickListener {
302 309
        upVideoView2.setOnTouchListener(new View.OnTouchListener() {
303 310
            @Override
304 311
            public boolean onTouch(View view, MotionEvent motionEvent) {
305
                boolean playing = upVideoView2.isPlaying();
306
                if (playing) {
307
                    upVideoView2.pause();
308
                    playIcon.setVisibility(View.VISIBLE);
309
                } else {
310
                    playIcon.setVisibility(View.GONE);
311
                    upVideoView2.start();
312
                if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
313
                    boolean playing = upVideoView2.isPlaying();
314
315
                    if (playing) {
316
                        upVideoView2.pause();
317
                        playIcon.setVisibility(View.VISIBLE);
318
                    } else {
319
                        playIcon.setVisibility(View.GONE);
320
                        upVideoView2.start();
321
                    }
312 322
                }
313
                return false;
323
                return true;
314 324
            }
315 325
        });
316 326
    }
@ -593,12 +603,6 @@ public class SvVideoShowView implements View.OnClickListener {
593 603
        }
594 604
    }
595 605
596
    public void onStop() {
597
        if (upVideoView2 != null) {
598
            upVideoView2.stopPlayback();
599
        }
600
    }
601
602 606
    public void onResume() {
603 607
        if (upVideoView2 != null && !upVideoView2.isPlaying() && talkRecommendBean != null &&
604 608
                !TextUtils.isEmpty(talkRecommendBean.videoUrl)) {
@ -617,9 +621,13 @@ public class SvVideoShowView implements View.OnClickListener {
617 621
        }
618 622
    }
619 623
620
    public void onPause() {
621
        if (upVideoView2 != null) {
622
            upVideoView2.stopPlayback();
624
625
    public void onStop() {
626
        if (upVideoView2 != null && upVideoView2.isPlaying()) {
627
            upVideoView2.pause();
628
        }
629
        if (playIcon != null) {
630
            playIcon.setVisibility(View.VISIBLE);
623 631
        }
624 632
    }
625 633

+ 5 - 0
app/src/main/java/com/electric/chargingpile/view/VideoCommentDialog.java

@ -267,6 +267,11 @@ public class VideoCommentDialog extends Dialog implements View.OnClickListener {
267 267
                                    show_comment_no.setVisibility(View.GONE);
268 268
                                }
269 269
                            }
270
                        }else{
271
                            String rtnMsg = JsonUtils.getKeyResult(response, "desc");
272
273
                            ToastUtil.showToast(context, rtnMsg, Toast.LENGTH_SHORT);
274
270 275
                        }
271 276
                    }
272 277
                });