Example usage for android.graphics Color YELLOW

List of usage examples for android.graphics Color YELLOW

Introduction

In this page you can find the example usage for android.graphics Color YELLOW.

Prototype

int YELLOW

To view the source code for android.graphics Color YELLOW.

Click Source Link

Usage

From source file:com.lvfq.rabbit.fragment.SlidingTabsColorsFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d(TAG, "onCreate");

    // BEGIN_INCLUDE (populate_tabs)
    /**//from w  ww.  ja v  a  2  s. c  om
     * Populate our tab list with tabs. Each item contains a title, indicator color and divider
     * color, which are used by {@link SlidingTabLayout}.
     */
    mTabs.add(new RabbitPagerItem(getString(R.string.video), // Title
            Color.BLUE, // Indicator color
            Color.GRAY, // Divider color
            0));

    mTabs.add(new RabbitPagerItem(getString(R.string.info), // Title
            Color.RED, // Indicator color
            Color.GRAY, // Divider color
            1));

    mTabs.add(new RabbitPagerItem(getString(R.string.extra), // Title
            Color.YELLOW, // Indicator color
            Color.GRAY, // Divider color
            2));
    // END_INCLUDE (populate_tabs)
}

From source file:com.cwx.daytodayaccount.fragment.SlidingTabsColorsFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // BEGIN_INCLUDE (populate_tabs)
    /**//from   w  ww. j  a v  a 2s.  c  o m
     * Populate our tab list with tabs. Each item contains a title, indicator color and divider
     * color, which are used by {@link SlidingTabLayout}.
     */
    mTabs.add(new SamplePagerItem(getString(R.string.tab_account), // Title
            Color.rgb(0, 188, 212), // Indicator color
            Color.GRAY // Divider color
    ));

    mTabs.add(new SamplePagerItem(getString(R.string.tab_notifications), // Title
            Color.MAGENTA, // Indicator color
            Color.GRAY // Divider color
    ));

    mTabs.add(new SamplePagerItem(getString(R.string.tab_diarys), // Title
            Color.rgb(255, 179, 0), // Indicator color
            Color.GRAY // Divider color
    ));

    mTabs.add(new SamplePagerItem(getString(R.string.tab_photos), // Title
            Color.rgb(102, 187, 106), // Indicator color
            Color.GRAY // Divider color
    ));

    mTabs.add(new SamplePagerItem(getString(R.string.tab_guanyin), // Title
            Color.YELLOW, // Indicator color
            Color.GRAY // Divider color
    ));

    mTabs.add(new SamplePagerItem(getString(R.string.tab_settings), // Title
            Color.BLUE, // Indicator color
            Color.GRAY // Divider color
    ));
    // END_INCLUDE (populate_tabs)
}

From source file:com.bytebit.classicbyte.ScreenMainMenu.java

public void draw(Canvas c) {
    this.parent.standard_paint.setColor(Color.WHITE);

    for (int i = 0; i != 9; i++) {
        for (int k = 0; k != 10; k++) {
            c.drawBitmap(TextureManager.getBitmap(3), k * (this.parent.renderer.width / 10),
                    (i + 1) * (this.parent.renderer.width / 10), this.parent.standard_paint);
        }//from w  w w. j  a v a2 s .c om
    }

    if (this.menu_current_tab == 1) {
        Rect bounds = new Rect();
        String g;
        for (int k = 0; k != this.server_list_name.size(); k++) {
            if (k >= this.server_list_name.size()) {
                break;
            }
            if ((this.parent.renderer.width * 0.12F + this.parent.renderer.width * 0.1F * k
                    + this.server_list_y_offset) >= 0
                    && (this.parent.renderer.width * 0.12F + this.parent.renderer.width * 0.1F * k
                            + this.server_list_y_offset) <= this.parent.renderer.height) {
                this.parent.standard_paint.setColor(Color.WHITE);
                this.parent.standard_paint.setTextSize(this.parent.renderer.width * 0.04F);
                c.drawBitmap(TextureManager.getBitmap(10),
                        (this.parent.renderer.width - TextureManager.getBitmap(10).getWidth()) / 2,
                        this.parent.renderer.width * 0.02F + this.parent.renderer.width * 0.12F
                                + this.parent.renderer.width * 0.1F * k + this.server_list_y_offset,
                        this.parent.standard_paint);
                g = this.server_list_name.get(k);
                this.parent.standard_paint.getTextBounds(this.server_list_name.get(k), 0,
                        this.server_list_name.get(k).length(), bounds);
                if (bounds.width() > TextureManager.getBitmap(10).getWidth() * 0.85F) {
                    while (bounds.width() > TextureManager.getBitmap(10).getWidth() * 0.85F) {
                        this.parent.standard_paint.getTextBounds(g + " ..", 0, (g + " ..").length(), bounds);
                        g = g.substring(0, g.length() - 1);
                    }
                    g = g + " ..";
                }
                c.drawText(g,
                        (this.parent.renderer.width - TextureManager.getBitmap(10).getWidth()) / 2
                                + this.parent.renderer.width * 0.02F,
                        this.parent.renderer.width * 0.08F + this.parent.renderer.width * 0.12F
                                + this.parent.renderer.width * 0.1F * k + this.server_list_y_offset,
                        this.parent.standard_paint);
                this.parent.standard_paint.setColor(Color.YELLOW);
                this.parent.standard_paint.getTextBounds(this.server_list_online_data.get(k), 0,
                        this.server_list_online_data.get(k).length(), bounds);
                c.drawText(this.server_list_online_data.get(k),
                        this.parent.renderer.width
                                - (this.parent.renderer.width - TextureManager.getBitmap(10).getWidth()) / 2
                                - this.parent.renderer.width * 0.02F - bounds.width(),
                        this.parent.renderer.width * 0.08F + this.parent.renderer.width * 0.12F
                                + this.parent.renderer.width * 0.1F * k + this.server_list_y_offset,
                        this.parent.standard_paint);
            }
        }
        c.drawBitmap(
                TextureManager.getBitmap(26), 0, TextureManager.getBitmap(2).getHeight()
                        + TextureManager.getBitmap(22).getHeight() + this.scrollbar_offset,
                this.parent.standard_paint);
        if (this.menu_button_highlighted == 3) {
            c.drawBitmap(TextureManager.getBitmap(25), 0, TextureManager.getBitmap(2).getHeight(),
                    this.parent.standard_paint);
        } else {
            c.drawBitmap(TextureManager.getBitmap(24), 0, TextureManager.getBitmap(2).getHeight(),
                    this.parent.standard_paint);
        }
        if (this.menu_button_highlighted == 4) {
            c.drawBitmap(TextureManager.getBitmap(23), 0,
                    this.parent.renderer.height - TextureManager.getBitmap(22).getHeight(),
                    this.parent.standard_paint);
        } else {
            c.drawBitmap(TextureManager.getBitmap(22), 0,
                    this.parent.renderer.height - TextureManager.getBitmap(22).getHeight(),
                    this.parent.standard_paint);
        }
    }
    if (this.menu_current_tab == 2) {
        Rect bounds = new Rect();
        this.parent.standard_paint.setColor(Color.WHITE);
        this.parent.standard_paint.setTextSize(this.parent.renderer.height * 0.25F);
        this.parent.standard_paint.getTextBounds("Nothing here", 0, "Nothing here".length(), bounds);
        c.drawText("Nothing here", (this.parent.renderer.width - bounds.width()) / 2,
                this.parent.renderer.height * 0.5F, this.parent.standard_paint);
    }

    for (int k = 0; k != 10; k++) {
        c.drawBitmap(TextureManager.getBitmap(2), k * TextureManager.getBitmap(2).getWidth(), 0,
                this.parent.standard_paint);
    }

    c.drawBitmap(TextureManager.getBitmap(4), this.parent.renderer.width * 0.05F, 0,
            this.parent.standard_paint);
    if (this.menu_button_highlighted == 1) {
        c.drawBitmap(TextureManager.getBitmap(8), this.parent.renderer.width * 0.1F * 6.5F,
                this.parent.renderer.width * 0.01F, this.parent.standard_paint);
    } else {
        c.drawBitmap(TextureManager.getBitmap(7), this.parent.renderer.width * 0.1F * 6.5F,
                this.parent.renderer.width * 0.01F, this.parent.standard_paint);
    }
    if (this.menu_button_highlighted == 2) {
        c.drawBitmap(TextureManager.getBitmap(6), this.parent.renderer.width * 0.1F * 8.75F,
                this.parent.renderer.width * 0.01F, this.parent.standard_paint);
    } else {
        c.drawBitmap(TextureManager.getBitmap(5), this.parent.renderer.width * 0.1F * 8.75F,
                this.parent.renderer.width * 0.01F, this.parent.standard_paint);
    }

    //c.drawBitmap(TextureManager.getBitmap(9), this.parent.renderer.width-TextureManager.getBitmap(9).getWidth(), this.parent.renderer.height-TextureManager.getBitmap(9).getHeight(), this.parent.standard_paint);
}

From source file:com.example.android.imaginarium.SlidingTabsColorsFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // BEGIN_INCLUDE (populate_tabs)
    /**/*from w  ww .  j a va  2 s .c om*/
     * Populate our tab list with tabs. Each item contains a title, indicator color and divider
     * color, which are used by {@link SlidingTabLayout}.
     */

    mTabs.add(new SamplePagerItem(getString(R.string.tab_newsfeed), // Title
            Color.BLUE, // Indicator color
            Color.GRAY // Divider color
    ));

    mTabs.add(new SamplePagerItem(getString(R.string.tab_new_story), // Title
            Color.RED, // Indicator color
            Color.GRAY // Divider color
    ));

    mTabs.add(new SamplePagerItem(getString(R.string.tab_my_stories), // Title
            Color.YELLOW, // Indicator color
            Color.GRAY // Divider color
    ));

    mTabs.add(new SamplePagerItem(getString(R.string.tab_notifications), // Title
            Color.GREEN, // Indicator color
            Color.GRAY // Divider color
    ));

    // END_INCLUDE (populate_tabs)
}

From source file:org.blanco.lacuenta.fragments.GraphFragment.java

public void loadData() {
    if (dataLoader == null || !AsyncTask.Status.RUNNING.equals(dataLoader.getStatus())) {
        if (displayTarget == CHART_TARGET) {
            dataLoader = new SplitsChartDataLoader(this);
        } else {/*w  w w  .j a v  a  2s  . c  o  m*/
            dataLoader = new SplitsDataLoader(this);
        }
        // Set the background of the selected target
        btnDay.setBackgroundColor(Color.TRANSPARENT);
        btnWeek.setBackgroundColor(Color.TRANSPARENT);
        btnMonth.setBackgroundColor(Color.TRANSPARENT);
        if (loadTarget.equals(TODAY_LOAD)) {
            btnDay.setBackgroundColor(Color.YELLOW);
        } else if (loadTarget.equals(WEEK_LOAD)) {
            btnWeek.setBackgroundColor(Color.YELLOW);
        } else {
            btnMonth.setBackgroundColor(Color.YELLOW);
        }
        dataLoader.execute(loadTarget);
    }
}

From source file:com.ubergeek42.WeechatAndroid.ChatLinesAdapter.java

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder holder;//from  w  w w .  j a v a 2 s .  c  o m

    // If we don't have the view, or we were using a filteredView, inflate a new one
    if (convertView == null) {
        convertView = inflater.inflate(R.layout.chatview_line, null);
        holder = new ViewHolder();
        holder.timestamp = (TextView) convertView.findViewById(R.id.chatline_timestamp);
        holder.prefix = (TextView) convertView.findViewById(R.id.chatline_prefix);
        holder.message = (TextView) convertView.findViewById(R.id.chatline_message);

        convertView.setTag(holder);

    } else {
        holder = (ViewHolder) convertView.getTag();
    }

    // Change the font sizes
    holder.timestamp.setTextSize(textSize);
    holder.prefix.setTextSize(textSize);
    holder.message.setTextSize(textSize);

    BufferLine chatLine = (BufferLine) getItem(position);

    // Render the timestamp
    if (enableTimestamp) {
        holder.timestamp.setText(timestampFormat.format(chatLine.getTimestamp()));
        holder.timestamp.setPadding(holder.timestamp.getPaddingLeft(), holder.timestamp.getPaddingTop(), 5,
                holder.timestamp.getPaddingBottom());
    } else {
        holder.timestamp.setText("");
        holder.timestamp.setPadding(holder.timestamp.getPaddingLeft(), holder.timestamp.getPaddingTop(), 0,
                holder.timestamp.getPaddingBottom());
    }

    // Recalculate the prefix width based on the size of one character(fixed width font)
    if (prefixWidth == 0) {
        holder.prefix.setMinimumWidth(0);
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < maxPrefix; i++) {
            sb.append("m");
        }
        holder.prefix.setText(sb.toString());
        holder.prefix.measure(convertView.getWidth(), convertView.getHeight());
        prefixWidth = holder.prefix.getMeasuredWidth();
    }

    // Render the prefix
    if (chatLine.getHighlight()) {
        String prefixStr = chatLine.getPrefix();
        Spannable highlightText = new SpannableString(prefixStr);
        highlightText.setSpan(new ForegroundColorSpan(Color.YELLOW), 0, prefixStr.length(),
                Spanned.SPAN_INCLUSIVE_INCLUSIVE);
        highlightText.setSpan(new BackgroundColorSpan(Color.MAGENTA), 0, prefixStr.length(),
                Spanned.SPAN_INCLUSIVE_INCLUSIVE);
        holder.prefix.setText(highlightText);
    } else {
        if (enableColor) {
            holder.prefix.setText(Html.fromHtml(chatLine.getPrefixHTML()), TextView.BufferType.SPANNABLE);
        } else {
            holder.prefix.setText(chatLine.getPrefix());
        }
    }
    if (prefix_align.equals("right")) {
        holder.prefix.setGravity(Gravity.RIGHT);
        holder.prefix.setMinimumWidth(prefixWidth);
    } else if (prefix_align.equals("left")) {
        holder.prefix.setGravity(Gravity.LEFT);
        holder.prefix.setMinimumWidth(prefixWidth);
    } else {
        holder.prefix.setGravity(Gravity.LEFT);
        holder.prefix.setMinimumWidth(0);
    }

    // Render the message

    if (enableColor) {
        holder.message.setText(Html.fromHtml(chatLine.getMessageHTML()), TextView.BufferType.SPANNABLE);
    } else {
        holder.message.setText(chatLine.getMessage());
    }

    return convertView;
}

From source file:com.adkdevelopment.earthquakesurvival.utils.Utilities.java

/**
 * Creates Bitmap for a Map marker depending on the magnitude of an earthquake
 * @param context from which call is being made
 * @param magnitude from 0 to 10 scale earthquake intensity
 * @return colorful oval of size depending on magnitude
 *//*from  w ww  . j av a 2 s.  c o m*/
public static Bitmap getEarthquakeMarker(Context context, Double magnitude) {

    if (magnitude < 1) {
        magnitude = 1.0;
    }

    GradientDrawable oval;
    oval = (GradientDrawable) ContextCompat.getDrawable(context, R.drawable.marker);

    if (oval != null) {

        int STROKE_SIZE = 5;
        float DASH_WIDTH = 9f;
        float DASH_GAP = 3f;

        if (magnitude >= 3 && magnitude <= 5) {
            oval.setColors(new int[] { Color.TRANSPARENT, Color.BLUE });
            oval.setStroke(STROKE_SIZE, Color.BLUE, DASH_WIDTH, DASH_GAP);
        } else if (magnitude > 5 && magnitude < 7) {
            oval.setColors(new int[] { Color.TRANSPARENT, Color.YELLOW });
            oval.setStroke(STROKE_SIZE, Color.YELLOW, DASH_WIDTH, DASH_GAP);
        } else if (magnitude >= 7) {
            oval.setColors(new int[] { Color.TRANSPARENT, Color.RED });
            oval.setStroke(STROKE_SIZE, Color.RED, DASH_WIDTH, DASH_GAP);
        } else {
            oval.setColors(new int[] { Color.TRANSPARENT, Color.GREEN });
            oval.setStroke(STROKE_SIZE, Color.GREEN, DASH_WIDTH, DASH_GAP);
        }

        int diameter = (int) (oval.getIntrinsicWidth() * magnitude / 4);

        Canvas canvas = new Canvas();
        Bitmap icon = Bitmap.createBitmap(diameter, diameter, Bitmap.Config.ARGB_8888);

        canvas.setBitmap(icon);
        oval.setBounds(0, 0, diameter, diameter);
        oval.draw(canvas);

        return icon;
    } else {
        return null;
    }
}

From source file:com.example.vendrisample.HelloEffects.java

License:asdf

private void initEffect() {
    EffectFactory effectFactory = mEffectContext.getFactory();
    if (mEffect != null) {
        mEffect.release();/*from w ww  .j ava  2s  .co m*/
    }
    /**
     * Initialize the correct effect based on the selected menu/action item
     */
    switch (mCurrentEffect) {

    case R.id.none:
        break;

    case R.id.autofix:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_AUTOFIX);
        mEffect.setParameter("scale", 0.5f);
        break;

    case R.id.bw:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_BLACKWHITE);
        mEffect.setParameter("black", .1f);
        mEffect.setParameter("white", .7f);
        break;

    case R.id.brightness:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_BRIGHTNESS);
        mEffect.setParameter("brightness", 2.0f);
        break;

    case R.id.contrast:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_CONTRAST);
        mEffect.setParameter("contrast", 1.4f);
        break;

    case R.id.crossprocess:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_CROSSPROCESS);
        break;

    case R.id.documentary:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_DOCUMENTARY);
        break;

    case R.id.duotone:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_DUOTONE);
        mEffect.setParameter("first_color", Color.YELLOW);
        mEffect.setParameter("second_color", Color.DKGRAY);
        break;

    case R.id.filllight:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_FILLLIGHT);
        mEffect.setParameter("strength", .8f);
        break;

    case R.id.fisheye:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_FISHEYE);
        mEffect.setParameter("scale", .5f);
        break;

    case R.id.flipvert:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_FLIP);
        mEffect.setParameter("vertical", true);
        break;

    case R.id.fliphor:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_FLIP);
        mEffect.setParameter("horizontal", true);
        break;

    case R.id.grain:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_GRAIN);
        mEffect.setParameter("strength", 1.0f);
        break;

    case R.id.grayscale:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_GRAYSCALE);
        break;

    case R.id.lomoish:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_LOMOISH);
        break;

    case R.id.negative:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_NEGATIVE);
        break;

    case R.id.posterize:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_POSTERIZE);
        break;

    case R.id.rotate:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_ROTATE);
        mEffect.setParameter("angle", 180);
        break;

    case R.id.saturate:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_SATURATE);
        mEffect.setParameter("scale", .5f);
        break;

    case R.id.sepia:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_SEPIA);
        break;

    case R.id.sharpen:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_SHARPEN);
        break;

    case R.id.temperature:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_TEMPERATURE);
        mEffect.setParameter("scale", .9f);
        break;

    case R.id.tint:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_TINT);
        mEffect.setParameter("tint", Color.MAGENTA);
        break;

    case R.id.vignette:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_VIGNETTE);
        mEffect.setParameter("scale", .5f);
        break;

    default:
        break;

    }
}

From source file:com.eeda123.gsell.order.AmazonOrderFragment.java

private void initRefresh() {
    //SwipeRefreshLayout
    mSwipeLayout = (SwipeRefreshLayout) getView().findViewById(R.id.swipeLayout);

    mSwipeLayout.setColorSchemeColors(Color.BLUE, Color.GREEN, Color.YELLOW, Color.RED);

    // ???// ww w  .  ja  v a  2 s .c  o  m
    mSwipeLayout.setDistanceToTriggerSync(300);
    // 
    mSwipeLayout.setProgressBackgroundColorSchemeColor(Color.WHITE);
    // ?
    mSwipeLayout.setSize(SwipeRefreshLayout.LARGE);

    //?
    mSwipeLayout.setOnRefreshListener(this);
}

From source file:com.example.android.mediaeffects.MediaEffectsFragment.java

private void initEffect() {
    EffectFactory effectFactory = mEffectContext.getFactory();
    if (mEffect != null) {
        mEffect.release();/*from w w  w.j a v a2 s  . co m*/
    }
    // Initialize the correct effect based on the selected menu/action item
    switch (mCurrentEffect) {

    case R.id.none:
        break;

    case R.id.autofix:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_AUTOFIX);
        mEffect.setParameter("scale", 0.5f);
        break;

    case R.id.bw:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_BLACKWHITE);
        mEffect.setParameter("black", .1f);
        mEffect.setParameter("white", .7f);
        break;

    case R.id.brightness:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_BRIGHTNESS);
        mEffect.setParameter("brightness", 2.0f);
        break;

    case R.id.contrast:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_CONTRAST);
        mEffect.setParameter("contrast", 1.4f);
        break;

    case R.id.crossprocess:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_CROSSPROCESS);
        break;

    case R.id.documentary:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_DOCUMENTARY);
        break;

    case R.id.duotone:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_DUOTONE);
        mEffect.setParameter("first_color", Color.YELLOW);
        mEffect.setParameter("second_color", Color.DKGRAY);
        break;

    case R.id.filllight:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_FILLLIGHT);
        mEffect.setParameter("strength", .8f);
        break;

    case R.id.fisheye:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_FISHEYE);
        mEffect.setParameter("scale", .5f);
        break;

    case R.id.flipvert:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_FLIP);
        mEffect.setParameter("vertical", true);
        break;

    case R.id.fliphor:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_FLIP);
        mEffect.setParameter("horizontal", true);
        break;

    case R.id.grain:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_GRAIN);
        mEffect.setParameter("strength", 1.0f);
        break;

    case R.id.grayscale:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_GRAYSCALE);
        break;

    case R.id.lomoish:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_LOMOISH);
        break;

    case R.id.negative:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_NEGATIVE);
        break;

    case R.id.posterize:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_POSTERIZE);
        break;

    case R.id.rotate:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_ROTATE);
        mEffect.setParameter("angle", 180);
        break;

    case R.id.saturate:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_SATURATE);
        mEffect.setParameter("scale", .5f);
        break;

    case R.id.sepia:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_SEPIA);
        break;

    case R.id.sharpen:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_SHARPEN);
        break;

    case R.id.temperature:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_TEMPERATURE);
        mEffect.setParameter("scale", .9f);
        break;

    case R.id.tint:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_TINT);
        mEffect.setParameter("tint", Color.MAGENTA);
        break;

    case R.id.vignette:
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_VIGNETTE);
        mEffect.setParameter("scale", .5f);
        break;

    default:
        break;
    }
}