Loading src/com/android/gallery3d/filtershow/editors/Editor.java +4 −9 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.gallery3d.filtershow.editors; import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; Loading Loading @@ -96,12 +97,11 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis mFilterTitle = stateButton; mButton = editTitle; MasterImage.getImage().resetGeometryImages(false); setMenuIcon(true); setUtilityPanelUI(actionButton, editControl); } public boolean showsPopupIndicator() { return true; return false; } /** Loading @@ -127,12 +127,7 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis } if (mButton != null) { if (showsPopupIndicator()) { mButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.filtershow_menu_marker, 0); } else { mButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0); } setMenuIcon(showsPopupIndicator()); } } Loading Loading @@ -282,7 +277,7 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis } public void openUtilityPanel(LinearLayout mAccessoryViewList) { setMenuIcon(false); setMenuIcon(showsPopupIndicator()); if (mImageShow != null) { mImageShow.openUtilityPanel(mAccessoryViewList); } Loading src/com/android/gallery3d/filtershow/editors/EditorChanSat.java +2 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,8 @@ public class EditorChanSat extends ParametricEditor implements OnSeekBarChangeLi FilterChanSatRepresentation csrep = getChanSatRep(); String menuString = mContext.getString(mMenuStrings[0]); switchToMode(csrep, FilterChanSatRepresentation.MODE_MASTER, menuString); } else { mButton.setText(mContext.getString(R.string.saturation)); } } Loading src/com/android/gallery3d/filtershow/editors/EditorCurves.java +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.gallery3d.filtershow.editors; import android.content.Context; import android.view.View; import android.widget.FrameLayout; import com.android.gallery3d.R; Loading @@ -38,6 +39,11 @@ public class EditorCurves extends Editor { } @Override public boolean showsPopupIndicator() { return true; } @Override public void createEditor(Context context, FrameLayout frameLayout) { super.createEditor(context, frameLayout); Loading @@ -54,6 +60,11 @@ public class EditorCurves extends Editor { mImageCurves.setFilterDrawRepresentation(drawRep); } } @Override public void setUtilityPanelUI(View actionButton, View editControl) { super.setUtilityPanelUI(actionButton,editControl); setMenuIcon(true); } @Override public boolean showsSeekBar() { Loading src/com/android/gallery3d/filtershow/editors/EditorDraw.java +12 −7 Original line number Diff line number Diff line Loading @@ -130,6 +130,7 @@ public class EditorDraw extends ParametricEditor implements FilterView { @Override public void openUtilityPanel(final LinearLayout accessoryViewList) { Button view = (Button) accessoryViewList.findViewById(R.id.applyEffect); if (useCompact(mContext)) { view.setText(mContext.getString(R.string.draw_hue)); view.setOnClickListener(new OnClickListener() { Loading @@ -138,6 +139,9 @@ public class EditorDraw extends ParametricEditor implements FilterView { showPopupMenu(accessoryViewList); } }); } else { view.setText(mContext.getString(R.string.imageDraw)); } } @Override Loading Loading @@ -224,6 +228,7 @@ public class EditorDraw extends ParametricEditor implements FilterView { R.layout.filtershow_draw_ui, (ViewGroup) editControl, true); mTabletUI = new EditorDrawTabletUI(this, mContext, lp); setMenuIcon(false); } Loading src/com/android/gallery3d/filtershow/editors/EditorGrad.java +31 −11 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ public class EditorGrad extends ParametricEditor @Override public void openUtilityPanel(final LinearLayout accessoryViewList) { Button view = (Button) accessoryViewList.findViewById(R.id.applyEffect); if (useCompact(mContext)) { view.setText(mContext.getString(R.string.editor_grad_brightness)); view.setOnClickListener(new OnClickListener() { @Override Loading @@ -121,6 +122,9 @@ public class EditorGrad extends ParametricEditor setUpPopupMenu(view); setEffectName(); } else { view.setText(mContext.getString(R.string.grad)); } } private void updateMenuItems(FilterGradRepresentation rep) { Loading Loading @@ -167,6 +171,7 @@ public class EditorGrad extends ParametricEditor fireRightAction(); } }); setMenuIcon(false); } public void updateParameters() { Loading Loading @@ -206,13 +211,28 @@ public class EditorGrad extends ParametricEditor FilterGradRepresentation rep = getGradRepresentation(); int value = progress + mMin; rep.setParameter(mMode, value); if (mSliderMode != mMode) { mSliderMode = mMode; mEffectName = ""; mEffectName = mContext.getResources().getString(getModeNameid(mMode)); mEffectName = mEffectName.toUpperCase(); } mTextView.setText(Integer.toString(value)); mView.invalidate(); commitLocalRepresentation(); } private int getModeNameid(int mode) { switch (mode) { case MODE_CONTRAST: return R.string.editor_grad_contrast; case MODE_BRIGHTNESS: return R.string.editor_grad_brightness; case MODE_SATURATION: return R.string.editor_grad_saturation; } return 0; } @Override public void onStartTrackingTouch(SeekBar seekBar) { Loading Loading
src/com/android/gallery3d/filtershow/editors/Editor.java +4 −9 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.gallery3d.filtershow.editors; import android.content.Context; import android.content.res.Configuration; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; Loading Loading @@ -96,12 +97,11 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis mFilterTitle = stateButton; mButton = editTitle; MasterImage.getImage().resetGeometryImages(false); setMenuIcon(true); setUtilityPanelUI(actionButton, editControl); } public boolean showsPopupIndicator() { return true; return false; } /** Loading @@ -127,12 +127,7 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis } if (mButton != null) { if (showsPopupIndicator()) { mButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.filtershow_menu_marker, 0); } else { mButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0); } setMenuIcon(showsPopupIndicator()); } } Loading Loading @@ -282,7 +277,7 @@ public class Editor implements OnSeekBarChangeListener, SwapButton.SwapButtonLis } public void openUtilityPanel(LinearLayout mAccessoryViewList) { setMenuIcon(false); setMenuIcon(showsPopupIndicator()); if (mImageShow != null) { mImageShow.openUtilityPanel(mAccessoryViewList); } Loading
src/com/android/gallery3d/filtershow/editors/EditorChanSat.java +2 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,8 @@ public class EditorChanSat extends ParametricEditor implements OnSeekBarChangeLi FilterChanSatRepresentation csrep = getChanSatRep(); String menuString = mContext.getString(mMenuStrings[0]); switchToMode(csrep, FilterChanSatRepresentation.MODE_MASTER, menuString); } else { mButton.setText(mContext.getString(R.string.saturation)); } } Loading
src/com/android/gallery3d/filtershow/editors/EditorCurves.java +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.gallery3d.filtershow.editors; import android.content.Context; import android.view.View; import android.widget.FrameLayout; import com.android.gallery3d.R; Loading @@ -38,6 +39,11 @@ public class EditorCurves extends Editor { } @Override public boolean showsPopupIndicator() { return true; } @Override public void createEditor(Context context, FrameLayout frameLayout) { super.createEditor(context, frameLayout); Loading @@ -54,6 +60,11 @@ public class EditorCurves extends Editor { mImageCurves.setFilterDrawRepresentation(drawRep); } } @Override public void setUtilityPanelUI(View actionButton, View editControl) { super.setUtilityPanelUI(actionButton,editControl); setMenuIcon(true); } @Override public boolean showsSeekBar() { Loading
src/com/android/gallery3d/filtershow/editors/EditorDraw.java +12 −7 Original line number Diff line number Diff line Loading @@ -130,6 +130,7 @@ public class EditorDraw extends ParametricEditor implements FilterView { @Override public void openUtilityPanel(final LinearLayout accessoryViewList) { Button view = (Button) accessoryViewList.findViewById(R.id.applyEffect); if (useCompact(mContext)) { view.setText(mContext.getString(R.string.draw_hue)); view.setOnClickListener(new OnClickListener() { Loading @@ -138,6 +139,9 @@ public class EditorDraw extends ParametricEditor implements FilterView { showPopupMenu(accessoryViewList); } }); } else { view.setText(mContext.getString(R.string.imageDraw)); } } @Override Loading Loading @@ -224,6 +228,7 @@ public class EditorDraw extends ParametricEditor implements FilterView { R.layout.filtershow_draw_ui, (ViewGroup) editControl, true); mTabletUI = new EditorDrawTabletUI(this, mContext, lp); setMenuIcon(false); } Loading
src/com/android/gallery3d/filtershow/editors/EditorGrad.java +31 −11 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ public class EditorGrad extends ParametricEditor @Override public void openUtilityPanel(final LinearLayout accessoryViewList) { Button view = (Button) accessoryViewList.findViewById(R.id.applyEffect); if (useCompact(mContext)) { view.setText(mContext.getString(R.string.editor_grad_brightness)); view.setOnClickListener(new OnClickListener() { @Override Loading @@ -121,6 +122,9 @@ public class EditorGrad extends ParametricEditor setUpPopupMenu(view); setEffectName(); } else { view.setText(mContext.getString(R.string.grad)); } } private void updateMenuItems(FilterGradRepresentation rep) { Loading Loading @@ -167,6 +171,7 @@ public class EditorGrad extends ParametricEditor fireRightAction(); } }); setMenuIcon(false); } public void updateParameters() { Loading Loading @@ -206,13 +211,28 @@ public class EditorGrad extends ParametricEditor FilterGradRepresentation rep = getGradRepresentation(); int value = progress + mMin; rep.setParameter(mMode, value); if (mSliderMode != mMode) { mSliderMode = mMode; mEffectName = ""; mEffectName = mContext.getResources().getString(getModeNameid(mMode)); mEffectName = mEffectName.toUpperCase(); } mTextView.setText(Integer.toString(value)); mView.invalidate(); commitLocalRepresentation(); } private int getModeNameid(int mode) { switch (mode) { case MODE_CONTRAST: return R.string.editor_grad_contrast; case MODE_BRIGHTNESS: return R.string.editor_grad_brightness; case MODE_SATURATION: return R.string.editor_grad_saturation; } return 0; } @Override public void onStartTrackingTouch(SeekBar seekBar) { Loading