Quellcode durchsuchen

找回分享功能误删图片,清除缓存提醒添加

FANGLH vor 9 Jahren
Ursprung
Commit
ded330e473

+ 5 - 1
WeiChat/build.gradle

@@ -2,13 +2,17 @@ apply plugin: 'com.android.application'
 apply plugin: 'com.getkeepsafe.dexcount'
 
 android {
+
+    lintOptions {
+        abortOnError false
+    }
     dexOptions {
         incremental true
         javaMaxHeapSize "4g"
     }
     signingConfigs {
         config {
-            storeFile file('E:/CompanyProject/applicationsignname[20150409]')
+            storeFile file('C:/Users/FANGlh/Desktop/UU5.5.1/applicationsignname[20150409]')
             storePassword '13237658359'
             keyAlias 'jie-20150409'
             keyPassword '13237658359'

+ 15 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/me/SettingActivity.java

@@ -132,7 +132,7 @@ public class SettingActivity extends ActionBackActivity implements View.OnClickL
     public void onClick(View v) {
         switch (v.getId()) {
             case R.id.clear_cache_rl:
-                clearCache();
+                showclearDialog();
                 break;
             case R.id.use_help_rl: {  // 用户反馈
                 Intent intent = new Intent(mContext, FeedbackActivity.class);
@@ -195,7 +195,21 @@ public class SettingActivity extends ActionBackActivity implements View.OnClickL
         shareIntent.setType("image/*");
         startActivity(Intent.createChooser(shareIntent, "分享到"));
     }
+    //确认是否清空本地缓存
+    private  void showclearDialog(){
+        new AlertDialog
+                .Builder(mContext)
+                .setTitle("温馨提示")
+                .setMessage("是否确定清除本地缓存")
+                .setNegativeButton("取消",null)
+                .setPositiveButton("确认",new DialogInterface.OnClickListener(){
 
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        clearCache();
+                    }
+                }).create().show();
+    }
     private void clearCache() {
         String filePath = MyApplication.getInstance().mAppDir;
         //删除文件