Fixed view type persistence problem.
This commit is contained in:
parent
2b8b434325
commit
d848fac2d7
@ -38,8 +38,6 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe
|
|||||||
private String tag = "file_manager";
|
private String tag = "file_manager";
|
||||||
private File homeDirectory;//make final?
|
private File homeDirectory;//make final?
|
||||||
private File currentDirectory;
|
private File currentDirectory;
|
||||||
private String filter = "";
|
|
||||||
private String[] filters = {"all",".odt",".ods",".odp"};
|
|
||||||
private int filterMode = FileUtilities.ALL;
|
private int filterMode = FileUtilities.ALL;
|
||||||
private int viewType = 0;
|
private int viewType = 0;
|
||||||
FileFilter fileFilter;
|
FileFilter fileFilter;
|
||||||
@ -49,8 +47,8 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe
|
|||||||
private ActionBar actionBar;
|
private ActionBar actionBar;
|
||||||
private SharedPreferences prefs;
|
private SharedPreferences prefs;
|
||||||
|
|
||||||
private String currentDirectoryKey = "CURRENT_DIRECTORY";
|
private static final String currentDirectoryKey = "CURRENT_DIRECTORY";
|
||||||
private String filterModeKey = "FILTER_MODE";
|
private static final String filterModeKey = "FILTER_MODE";
|
||||||
public static final String EXPLORER_VIEW_TYPE = "EXPLORER_VIEW_TYPE";
|
public static final String EXPLORER_VIEW_TYPE = "EXPLORER_VIEW_TYPE";
|
||||||
public static final String EXPLORER_PREFS = "EXPLORER_PREFS";
|
public static final String EXPLORER_PREFS = "EXPLORER_PREFS";
|
||||||
|
|
||||||
@ -274,6 +272,7 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe
|
|||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
outState.putString( currentDirectoryKey , currentDirectory.getAbsolutePath() );
|
outState.putString( currentDirectoryKey , currentDirectory.getAbsolutePath() );
|
||||||
|
prefs.edit().putInt(EXPLORER_VIEW_TYPE, viewType).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -285,7 +284,6 @@ public class LibreOfficeUIActivity extends Activity implements OnNavigationListe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
// TODO need to save fileSystem state here.
|
|
||||||
|
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user