<LinearLayout
android:id="@+id/historyPanel"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1"
android:visibility="gone" >
super.onConfigurationChanged(newConfig);
setDefaultValues();
loadXML();
- mShowingImageStatePanel = true;
+ if (getResources().getConfiguration().orientation
+ == Configuration.ORIENTATION_LANDSCAPE) {
+ mShowingImageStatePanel = true;
+ }
if (mShowingHistoryPanel) {
toggleHistoryPanel();
}
if (mShowingImageStatePanel) {
findViewById(R.id.imageStatePanel).setVisibility(View.GONE);
- mShowingImageStatePanel = false;
}
int translate = translateMainPanel(viewList);
mShowingHistoryPanel = true;
if (getResources().getConfiguration().orientation
== Configuration.ORIENTATION_PORTRAIT) {
+ // If portrait, always remove the state panel
+ mShowingImageStatePanel = false;
if (PanelController.useAnimations()) {
view.animate().setDuration(200).x(translate)
.withLayer().withEndAction(new Runnable() {
.alpha(1.0f).start();
}
} else {
+ findViewById(R.id.filtersPanel).setVisibility(View.GONE);
viewList.setVisibility(View.VISIBLE);
}
} else {
}
} else {
viewList.setVisibility(View.GONE);
+ findViewById(R.id.filtersPanel).setVisibility(View.VISIBLE);
+ // In landscape, bring back the state panel if it was there
+ if (mShowingImageStatePanel) {
+ findViewById(R.id.imageStatePanel).setVisibility(View.VISIBLE);
+ }
}
}
invalidateOptionsMenu();