|
@@ -132,7 +132,7 @@ public class SettingActivity extends ActionBackActivity implements View.OnClickL
|
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
|
switch (v.getId()) {
|
|
switch (v.getId()) {
|
|
|
case R.id.clear_cache_rl:
|
|
case R.id.clear_cache_rl:
|
|
|
- clearCache();
|
|
|
|
|
|
|
+ showclearDialog();
|
|
|
break;
|
|
break;
|
|
|
case R.id.use_help_rl: { // 用户反馈
|
|
case R.id.use_help_rl: { // 用户反馈
|
|
|
Intent intent = new Intent(mContext, FeedbackActivity.class);
|
|
Intent intent = new Intent(mContext, FeedbackActivity.class);
|
|
@@ -195,7 +195,21 @@ public class SettingActivity extends ActionBackActivity implements View.OnClickL
|
|
|
shareIntent.setType("image/*");
|
|
shareIntent.setType("image/*");
|
|
|
startActivity(Intent.createChooser(shareIntent, "分享到"));
|
|
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() {
|
|
private void clearCache() {
|
|
|
String filePath = MyApplication.getInstance().mAppDir;
|
|
String filePath = MyApplication.getInstance().mAppDir;
|
|
|
//删除文件
|
|
//删除文件
|