diff options
| author | nicolasroard <nicolasroard@google.com> | 2013-03-05 14:27:54 -0800 |
|---|---|---|
| committer | nicolasroard <nicolasroard@google.com> | 2013-03-05 14:27:54 -0800 |
| commit | 63b33e8c7ebeeec2b520fb419d89ada712ad6604 (patch) | |
| tree | b65cc8f2a7315def39ba10757455f3952e8c593e | |
| parent | 6ee7feeefec9e99ea6b98408323a416214d0e817 (diff) | |
| download | android_packages_apps_Gallery2-63b33e8c7ebeeec2b520fb419d89ada712ad6604.tar.gz android_packages_apps_Gallery2-63b33e8c7ebeeec2b520fb419d89ada712ad6604.tar.bz2 android_packages_apps_Gallery2-63b33e8c7ebeeec2b520fb419d89ada712ad6604.zip | |
Improves visual history
Change-Id: Ie43e99777d590a504b068d81f327119cca03b9d9
| -rw-r--r-- | res/layout-land/filtershow_activity.xml | 2 | ||||
| -rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/res/layout-land/filtershow_activity.xml b/res/layout-land/filtershow_activity.xml index 81e4fba76..8cef0cef8 100644 --- a/res/layout-land/filtershow_activity.xml +++ b/res/layout-land/filtershow_activity.xml @@ -89,7 +89,7 @@ <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" > diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index 518563a6d..4b5956530 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -872,7 +872,10 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, super.onConfigurationChanged(newConfig); setDefaultValues(); loadXML(); - mShowingImageStatePanel = true; + if (getResources().getConfiguration().orientation + == Configuration.ORIENTATION_LANDSCAPE) { + mShowingImageStatePanel = true; + } if (mShowingHistoryPanel) { toggleHistoryPanel(); } @@ -911,7 +914,6 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, if (mShowingImageStatePanel) { findViewById(R.id.imageStatePanel).setVisibility(View.GONE); - mShowingImageStatePanel = false; } int translate = translateMainPanel(viewList); @@ -919,6 +921,8 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, 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() { @@ -938,6 +942,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, .alpha(1.0f).start(); } } else { + findViewById(R.id.filtersPanel).setVisibility(View.GONE); viewList.setVisibility(View.VISIBLE); } } else { @@ -953,6 +958,11 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, } } 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(); |
