e">
@@ -126,7 +137,7 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
126 137
     }
127 138
 
128 139
     @OnClick(R.id.iv_scan)
129
-    void scanToFetchSessionQR(){
140
+    void scanToFetchSessionQR() {
130 141
         MobclickAgent.onEvent(this, UmengEvent.session_scan_qr_btn_click);
131 142
         Intent intent = new Intent(SessionActivity.this, QRCaptureActivity.class);
132 143
         startActivityForResult(intent, JOIN_REQUEST_CODE);
@@ -134,22 +145,22 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
134 145
     }
135 146
 
136 147
     @OnClick(R.id.iv_qrcode)
137
-    void showQRCodeForSession(){
148
+    void showQRCodeForSession() {
138 149
         MobclickAgent.onEvent(this, UmengEvent.session_view_qr_btn_click);
139
-        Intent intent = new Intent(this,SessionQRCodeActivity.class);
140
-        intent.putExtra("qrcode",sessionBean.sessionId);
150
+        Intent intent = new Intent(this, SessionQRCodeActivity.class);
151
+        intent.putExtra("qrcode", sessionBean.sessionId);
141 152
         startActivity(intent);
142 153
     }
143 154
 
144 155
     @OnClick(R.id.title_bar_back_layout)
145
-    void backToMain(){
146
-       new ExitSessionConfirmPopup(this,this).showPopupWindow();
156
+    void backToMain() {
157
+        new ExitSessionConfirmPopup(this, this).showPopupWindow();
147 158
     }
148 159
 
149 160
     @OnClick(R.id.btn_session_complete)
150
-    void onSessionComplete(){
161
+    void onSessionComplete() {
151 162
         MobclickAgent.onEvent(this, UmengEvent.session_finish_btn_click);
152
-        new ExitSessionConfirmPopup(this,this).showPopupWindow();
163
+        new ExitSessionConfirmPopup(this, this).showPopupWindow();
153 164
     }
154 165
 
155 166
     @Override
@@ -157,7 +168,7 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
157 168
         photosRecyclerView.post(new Runnable() {
158 169
             @Override
159 170
             public void run() {
160
-                LogHelper.d(TAG,"addNewPhoto to UI "+bean);
171
+                LogHelper.d(TAG, "addNewPhoto to UI " + bean);
161 172
                 adapter.addPhotoBean(bean);
162 173
                 photosRecyclerView.smoothScrollToPosition(0);
163 174
             }
@@ -193,14 +204,14 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
193 204
 
194 205
     @Override
195 206
     public void showToast(final String toast) {
196
-        if(isBackground){
207
+        if (isBackground) {
197 208
             return;
198 209
         }
199
-        if(photosRecyclerView!=null){
210
+        if (photosRecyclerView != null) {
200 211
             photosRecyclerView.post(new Runnable() {
201 212
                 @Override
202 213
                 public void run() {
203
-                    Toast.makeText(SessionActivity.this,toast,Toast.LENGTH_SHORT).show();
214
+                    Toast.makeText(SessionActivity.this, toast, Toast.LENGTH_SHORT).show();
204 215
                 }
205 216
             });
206 217
         }
@@ -210,7 +221,7 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
210 221
 
211 222
     @Override
212 223
     public void refreshRecyclerView() {
213
-        if(adapter!=null && photosRecyclerView!=null && photosRecyclerView.getVisibility()==View.VISIBLE){
224
+        if (adapter != null && photosRecyclerView != null && photosRecyclerView.getVisibility() == View.VISIBLE) {
214 225
             photosRecyclerView.post(new Runnable() {
215 226
                 @Override
216 227
                 public void run() {
@@ -222,25 +233,25 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
222 233
 
223 234
     @Override
224 235
     public void addPhotos(final ArrayList<PhotoBean> photoList) {
225
-        if(photoList==null||photoList.size()<1) {
236
+        if (photoList == null || photoList.size() < 1) {
226 237
             return;
227 238
         }
228 239
         photosRecyclerView.post(new Runnable() {
229 240
             @Override
230 241
             public void run() {
231 242
                 adapter.addPreviousPhotos(photoList);
232
-                photosRecyclerView.smoothScrollToPosition(photoList.size()-1);
243
+                photosRecyclerView.smoothScrollToPosition(photoList.size() - 1);
233 244
             }
234 245
         });
235 246
     }
236 247
 
237 248
     @Override
238 249
     public void refreshCameraStatus(final String status) {
239
-        if(cameraStatusTextView!=null){
250
+        if (cameraStatusTextView != null) {
240 251
             cameraStatusTextView.post(new Runnable() {
241 252
                 @Override
242 253
                 public void run() {
243
-                    if(cameraStatusTextView!=null){
254
+                    if (cameraStatusTextView != null) {
244 255
                         cameraStatusTextView.setText(status);
245 256
                     }
246 257
                 }
@@ -250,16 +261,16 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
250 261
 
251 262
     @Override
252 263
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
253
-        super.onActivityResult(requestCode,resultCode,data);
264
+        super.onActivityResult(requestCode, resultCode, data);
254 265
         if (resultCode == Activity.RESULT_OK) {
255 266
             if (data == null || data.getStringExtra("info") == null) {
256 267
                 return;
257 268
             }
258 269
             String qrInfo = data.getStringExtra("info");
259
-            if(qrInfo.contains("pai.ai/g/")||qrInfo.contains("xfoto.com.cn/g/")){
260
-                String groupId = qrInfo.substring(qrInfo.lastIndexOf("/")+1);
270
+            if (qrInfo.contains("pai.ai/g/") || qrInfo.contains("xfoto.com.cn/g/")) {
271
+                String groupId = qrInfo.substring(qrInfo.lastIndexOf("/") + 1);
261 272
                 presenter.addSessionPhotos2Group(groupId);
262
-            }else{
273
+            } else {
263 274
                 presenter.change2QRCodeSessionId(data.getStringExtra("info"));
264 275
             }
265 276
         }
@@ -267,7 +278,7 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
267 278
 
268 279
     @Override
269 280
     public void onClick(View view) {
270
-       if(view.getId()==R.id.btn_exit_session_confirm){
281
+        if (view.getId() == R.id.btn_exit_session_confirm) {
271 282
             presenter.stop();
272 283
             finish();
273 284
         }
@@ -275,7 +286,7 @@ public class SessionActivity extends BaseActivity implements SessionContract.Vie
275 286
 
276 287
     @Override
277 288
     public void onBackPressed() {
278
-        new ExitSessionConfirmPopup(this,this).showPopupWindow();
289
+        new ExitSessionConfirmPopup(this, this).showPopupWindow();
279 290
     }
280 291
 
281 292
 

+ 35 - 0
app/src/main/res/layout/activity_briefs.xml

@@ -394,6 +394,41 @@
394 394
                         android:textOn="@null" />
395 395
 
396 396
                 </LinearLayout>
397
+                <View
398
+                    android:layout_width="match_parent"
399
+                    android:layout_height="1px"
400
+                    android:background="@color/text_hint_grey_color" />
401
+
402
+                <LinearLayout
403
+                    android:layout_width="match_parent"
404
+                    android:layout_height="32dp"
405
+                    android:orientation="horizontal">
406
+
407
+                    <TextView
408
+                        android:id="@+id/tv_energy_save"
409
+                        android:layout_width="0dp"
410
+                        android:layout_weight="1"
411
+                        android:layout_height="wrap_content"
412
+                        android:layout_gravity="center_vertical|left"
413
+                        android:paddingLeft="10dp"
414
+                        android:text="@string/energy_mode_off"
415
+                        android:textColor="@color/_7B8088"
416
+                        android:textSize="14sp" />
417
+
418
+                    <ToggleButton
419
+                        android:id="@+id/toggle_energy_save"
420
+                        android:layout_width="56dp"
421
+                        android:layout_height="20dp"
422
+                        android:layout_marginRight="12dp"
423
+                        android:layout_gravity="center_vertical"
424
+                        android:background="@drawable/toggle_button_selector"
425
+                        android:checked="false"
426
+                        android:gravity="center"
427
+                        android:textColor="@color/white"
428
+                        android:textOff="@null"
429
+                        android:textOn="@null" />
430
+
431
+                </LinearLayout>
397 432
 
398 433
 
399 434
             </LinearLayout>

+ 2 - 0
app/src/main/res/values/strings.xml

@@ -142,6 +142,8 @@
142 142
     <string name="logout_user">退出登录</string>
143 143
 
144 144
     <string name="upload_in_mobile_network">运营商网络下自动上传</string>
145
+    <string name="energy_mode_on">节能模式已开启</string>
146
+    <string name="energy_mode_off">节能模式已关闭</string>
145 147
 
146 148
     <string name="can_not_delete">该照片已在上传队列,无法删除</string>
147 149
     <string name="auto_upload_after_seconds">距加入上传队列还有%d秒</string>

lensman - Gogs: Go Git Service

Нет описания

chengzhenyu: f4c7901669 热修复框架 лет %!s(int64=9): %!d(string=назад)
..
hotpatch f4c7901669 热修复框架 лет %!s(int64=9): %!d(string=назад)