summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-08-15 09:36:04 -0700
committerJohn Hoford <hoford@google.com>2013-08-15 09:36:04 -0700
commit8cb64bba90333b7b54c4b270fd4448b3d856f2bc (patch)
treec137470388d864647582968c2b6fe0302c1dabb6
parent2228e7f0000db4c3f7fb92519f9f4c2856dd47a1 (diff)
downloadandroid_packages_apps_Gallery2-8cb64bba90333b7b54c4b270fd4448b3d856f2bc.tar.gz
android_packages_apps_Gallery2-8cb64bba90333b7b54c4b270fd4448b3d856f2bc.tar.bz2
android_packages_apps_Gallery2-8cb64bba90333b7b54c4b270fd4448b3d856f2bc.zip
fix broken sliders
Change-Id: Ib1073516efd039838ea2e2e13e027197b6383adf
-rw-r--r--src/com/android/gallery3d/filtershow/controller/BasicSlider.java2
-rw-r--r--src/com/android/gallery3d/filtershow/editors/Editor.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/controller/BasicSlider.java b/src/com/android/gallery3d/filtershow/controller/BasicSlider.java
index 9d8278d52..811b47466 100644
--- a/src/com/android/gallery3d/filtershow/controller/BasicSlider.java
+++ b/src/com/android/gallery3d/filtershow/controller/BasicSlider.java
@@ -43,7 +43,7 @@ public class BasicSlider implements Control {
LinearLayout lp = (LinearLayout) inflater.inflate(
R.layout.filtershow_seekbar, container, true);
mSeekBar = (SeekBar) lp.findViewById(R.id.primarySeekBar);
-
+ mSeekBar.setVisibility(View.VISIBLE);
updateUI();
mSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
diff --git a/src/com/android/gallery3d/filtershow/editors/Editor.java b/src/com/android/gallery3d/filtershow/editors/Editor.java
index c0d499c65..d5717d02f 100644
--- a/src/com/android/gallery3d/filtershow/editors/Editor.java
+++ b/src/com/android/gallery3d/filtershow/editors/Editor.java
@@ -17,6 +17,7 @@
package com.android.gallery3d.filtershow.editors;
import android.content.Context;
+import android.content.res.Configuration;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -118,6 +119,12 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis
mSeekBar = (SeekBar) lp.findViewById(R.id.primarySeekBar);
mSeekBar.setOnSeekBarChangeListener(this);
mSeekBar.setVisibility(View.GONE);
+ if (context.getResources().getConfiguration().orientation
+ == Configuration.ORIENTATION_PORTRAIT) {
+ if (showsSeekBar()) {
+ mSeekBar.setVisibility(View.VISIBLE);
+ }
+ }
if (mButton != null) {
if (showsPopupIndicator()) {