文件管理器源码分析(四)

时间:2021-07-15 21:07:25
package net.micode.fileexplorer;
/**
* 个类建立一实例,不是线程安全
* 单实例设置工具,保存1个选项,否显示隐藏文件和上.”
*/
public class Settings {
// whether show system and cache images, default not
private boolean mShowDotAndHiddenFiles;
private static Settings mInstance;
private Settings() {
}
public static Settings instance() {
if(mInstance == null) {
mInstance = new Settings();
}
return mInstance;
}
public boolean getShowDotAndHiddenFiles() {
return mShowDotAndHiddenFiles;
}
public void setShowDotAndHiddenFiles(boolean s) {
mShowDotAndHiddenFiles = s;
}
}