|
|
@@ -78,7 +78,7 @@ public class ImageSourceActivity extends BaseActivity { |
|
|
|
}); |
|
|
|
String cacheSize = getCacheSize(); |
|
|
|
if(!cacheSize.isEmpty()){ |
|
|
|
delete_all.setText("已缓存:"+getCacheSize()+"\n删除所有缓存图片"); |
|
|
|
delete_all.setText("已缓存:"+cacheSize+"\n删除所有缓存图片"); |
|
|
|
} |
|
|
|
} |
|
|
|
/** |
|
|
@@ -110,6 +110,7 @@ public class ImageSourceActivity extends BaseActivity { |
|
|
|
rl_yx_file.getAdapter().notifyDataSetChanged(); |
|
|
|
} |
|
|
|
} |
|
|
|
delete_all.setText("删除所有缓存图片"); |
|
|
|
break; |
|
|
|
case R.id.baocunbendi://保存按钮 |
|
|
|
for (FileEntity item : PickerManager.getInstance().files) { |
|
|
@@ -149,6 +150,7 @@ public class ImageSourceActivity extends BaseActivity { |
|
|
|
} |
|
|
|
rl_yx_file.setLayoutManager(new LinearLayoutManager(context)); |
|
|
|
FilePickerShowAdapter adapter = new FilePickerShowAdapter(context, yx_files); |
|
|
|
adapter.setCallBack(callBack); |
|
|
|
rl_yx_file.setAdapter(adapter); |
|
|
|
adapter.setOnItemClickListener(new OnFileItemClickListener() { |
|
|
|
@Override |
|
|
@@ -166,8 +168,16 @@ public class ImageSourceActivity extends BaseActivity { |
|
|
|
// startActivity(intent); |
|
|
|
} |
|
|
|
}); |
|
|
|
delete_all.setText("已缓存:"+getCacheSize()+"\n删除所有缓存图片"); |
|
|
|
} |
|
|
|
|
|
|
|
private FilePickerShowAdapter.CallBack callBack = new FilePickerShowAdapter.CallBack() { |
|
|
|
@Override |
|
|
|
public void delete() { |
|
|
|
delete_all.setText("已缓存:"+getCacheSize()+"\n删除所有缓存图片"); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
private static boolean checkExits(String path) { |
|
|
|
for (FileEntity entity : PickerManager.getInstance().files) { |
|
|
|
if (entity.getPath().equals(path)) { |
|
|
|