X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d0767f1a4f45c5ab5ef57fa609688e2a1cc56b36..6cfa24f55ab605770df08a6bed889bfccf0c0888:/src/com/owncloud/android/ui/activity/FileDisplayActivity.java diff --git a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java index 2be4e750..97660e7d 100644 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -211,6 +211,19 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements mDualPane = (findViewById(R.id.file_details_container) != null); if (mDualPane) { initFileDetailsInDualPane(); + } else { + // quick patchES to fix problem in turn from landscape to portrait, when a file is selected in the right pane + // TODO serious refactorization in activities and fragments providing file browsing and handling + if (mCurrentFile != null) { + onFileClick(mCurrentFile); + mCurrentFile = null; + } + Fragment rightPanel = getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG); + if (rightPanel != null) { + FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); + transaction.remove(rightPanel); + transaction.commit(); + } } // Action bar setup @@ -265,7 +278,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements startActivity(intent); // the new activity won't be created until this.onStart() and this.onResume() are finished; } - + /** * Load of state dependent of the existence of an ownCloud account */