From 8cb64bba90333b7b54c4b270fd4448b3d856f2bc Mon Sep 17 00:00:00 2001 From: John Hoford Date: Thu, 15 Aug 2013 09:36:04 -0700 Subject: [PATCH] fix broken sliders Change-Id: Ib1073516efd039838ea2e2e13e027197b6383adf --- src/com/android/gallery3d/filtershow/controller/BasicSlider.java | 2 +- src/com/android/gallery3d/filtershow/editors/Editor.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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()) { -- 2.11.0