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

Commit be31e587 authored by nicolasroard's avatar nicolasroard
Browse files

Hides popup indicator on some editors

Change-Id: I88f17b9352c582f26f09a74db9d91e1fb81dbeae
parent 91be98c3
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -17,15 +17,13 @@
package com.android.gallery3d.filtershow.editors;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.PopupMenu;
import android.widget.SeekBar;
import android.widget.*;
import android.widget.SeekBar.OnSeekBarChangeListener;

import com.android.gallery3d.R;
@@ -85,6 +83,10 @@ public class Editor implements OnSeekBarChangeListener {
        return true;
    }

    public boolean showsPopupIndicator() {
        return true;
    }

    /**
     * @param actionButton the would be the area for menu etc
     * @param editControl this is the black area for sliders etc
@@ -97,6 +99,14 @@ public class Editor implements OnSeekBarChangeListener {
        } else {
            mSeekBar.setVisibility(View.INVISIBLE);
        }
        Button button = (Button) actionButton.findViewById(R.id.applyEffect);
        if (button != null) {
            if (showsPopupIndicator()) {
                button.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.filtershow_menu_marker, 0);
            } else {
                button.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
            }
        }
    }

    @Override
+5 −0
Original line number Diff line number Diff line
@@ -62,4 +62,9 @@ public class EditorFlip extends Editor implements EditorInfo {
    public boolean showsSeekBar() {
        return false;
    }

    @Override
    public boolean showsPopupIndicator() {
        return false;
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -62,4 +62,9 @@ public class EditorRotate extends Editor implements EditorInfo {
    public boolean showsSeekBar() {
        return false;
    }

    @Override
    public boolean showsPopupIndicator() {
        return false;
    }
}
+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;
@@ -73,4 +74,9 @@ public class EditorStraighten extends Editor implements EditorInfo {
    public boolean showsSeekBar() {
        return false;
    }

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