You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. open the filedialog with the START_PATH: /
2. select a directory, such as /etc
3. rotate the screen, the loacation come back to START_PATH
What is the expected output? What do you see instead?
The location should keep the same when the screen was rotated.
I see the loaction come back to START_PATH instead.
What version of the product are you using? On what operating system?
I found this problem in android 2.1, 2.2
Please provide any additional information below.
to fix this problem, the onPause method should be overrided.
@Override
protected void onPause() {
String myPathStr = myPath.getText().toString();
int idx = myPathStr.lastIndexOf(':');
String currPath = myPathStr.substring(idx + 2);
getIntent().putExtra(START_PATH, currPath);
super.onPause();
}
Original issue reported on code.google.com by stevens...@gmail.com on 1 Aug 2011 at 12:49
The text was updated successfully, but these errors were encountered:
Fixed it using the following code on FileDialog.java:
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
super.onSaveInstanceState(savedInstanceState);
savedInstanceState.putString("CurrentPath", currentPath);
}
@Override
public void onRestoreInstanceState(Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
currentPath = savedInstanceState.getString("CurrentPath");
getDir(currentPath);
}
Original comment by brunomac...@gmail.com on 26 May 2013 at 6:54
Original issue reported on code.google.com by
stevens...@gmail.com
on 1 Aug 2011 at 12:49The text was updated successfully, but these errors were encountered: