OSDN Git Service

fix broken sliders
authorJohn Hoford <hoford@google.com>
Thu, 15 Aug 2013 16:36:04 +0000 (09:36 -0700)
committerJohn Hoford <hoford@google.com>
Thu, 15 Aug 2013 16:36:04 +0000 (09:36 -0700)
Change-Id: Ib1073516efd039838ea2e2e13e027197b6383adf

src/com/android/gallery3d/filtershow/controller/BasicSlider.java
src/com/android/gallery3d/filtershow/editors/Editor.java

index 9d8278d..811b474 100644 (file)
@@ -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() {
 
index c0d499c..d5717d0 100644 (file)
@@ -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()) {