Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91be98c3 authored by nicolasroard's avatar nicolasroard
Browse files

Hides seekbar in some editors

Change-Id: Ifce385f9a6bf9b741f0873f49d826fbcf453d97c
parent 0dd47d9e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -81,13 +81,22 @@ public class Editor implements OnSeekBarChangeListener {
        return mShowParameter;
    }

    public boolean showsSeekBar() {
        return true;
    }

    /**
     * @param actionButton the would be the area for menu etc
     * @param editControl this is the black area for sliders etc
     */
    public void setUtilityPanelUI(View actionButton, View editControl) {
        mSeekBar = (SeekBar) editControl.findViewById(R.id.primarySeekBar);
        if (showsSeekBar()) {
            mSeekBar.setOnSeekBarChangeListener(this);
            mSeekBar.setVisibility(View.VISIBLE);
        } else {
            mSeekBar.setVisibility(View.INVISIBLE);
        }
    }

    @Override
+6 −0
Original line number Diff line number Diff line
@@ -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;
@@ -60,6 +61,11 @@ public class EditorCrop extends Editor implements EditorInfo {
        }
    }

    @Override
    public boolean showsSeekBar() {
        return false;
    }

    @Override
    public int getTextId() {
        return R.string.crop;
+6 −0
Original line number Diff line number Diff line
@@ -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;
@@ -48,4 +49,9 @@ public class EditorCurves extends Editor {
            mImageCurves.setFilterDrawRepresentation(drawRep);
        }
    }

    @Override
    public boolean showsSeekBar() {
        return false;
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -78,6 +78,11 @@ public class EditorDraw extends Editor {
        });
    }

    @Override
    public boolean showsSeekBar() {
        return false;
    }

    private void showPopupMenu(LinearLayout accessoryViewList) {
        final Button button = (Button) accessoryViewList.findViewById(
                R.id.applyEffect);
+5 −0
Original line number Diff line number Diff line
@@ -57,4 +57,9 @@ public class EditorFlip extends Editor implements EditorInfo {
    public boolean getOverlayOnly() {
        return true;
    }

    @Override
    public boolean showsSeekBar() {
        return false;
    }
}
Loading