Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8660065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:09:48+00:00 2026-06-12T16:09:48+00:00

Glow effect is working fine. my doubt is how to hide glow effect? if

  • 0

Glow effect is working fine. my doubt is how to hide glow effect? if i click my imageview, that time only i wish to show my glow effect please how to hide and show glow effect while on click.

code:

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // An added margin to the initial image
        int margin = 24;
        int halfMargin = margin / 2;

        // the glow radius
        int glowRadius = 16;

        // the glow color
        int glowColor = Color.rgb(0, 192, 255);

        // The original image to use
        Bitmap src = BitmapFactory.decodeResource(getResources(),
                R.drawable.test);

        // extract the alpha from the source image
        Bitmap alpha = src.extractAlpha();

        // The output bitmap (with the icon + glow)
        Bitmap bmp = Bitmap.createBitmap(src.getWidth() + margin,
                src.getHeight() + margin, Bitmap.Config.ARGB_8888);

        // The canvas to paint on the image
        Canvas canvas = new Canvas(bmp);

        Paint paint = new Paint();
        paint.setColor(glowColor);

        // outer glow
        paint.setMaskFilter(new BlurMaskFilter(glowRadius, Blur.OUTER));
        canvas.drawBitmap(alpha, halfMargin, halfMargin, paint);

        // original icon
        canvas.drawBitmap(src, halfMargin, halfMargin, null);
        setContentView(R.layout.activity_main);

        ((ImageView) findViewById(R.id.bmpImg)).setImageBitmap(bmp);

    }
}

present screen shot:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:09:49+00:00Added an answer on June 12, 2026 at 4:09 pm

    set onclicklistener and implement this code:

    .setOnClickListener(clicklistener);
    
    
    private OnClickListener backListener = new OnClickListener() {
            public void onClick(View v) {
        // An added margin to the initial image
            int margin = 24;
            int halfMargin = margin / 2;
    
            // the glow radius
            int glowRadius = 16;
    
            // the glow color
            int glowColor = Color.rgb(0, 192, 255);
    
            // The original image to use
            Bitmap src = BitmapFactory.decodeResource(getResources(),
                    R.drawable.test);
    
            // extract the alpha from the source image
            Bitmap alpha = src.extractAlpha();
    
            // The output bitmap (with the icon + glow)
            Bitmap bmp = Bitmap.createBitmap(src.getWidth() + margin,
                    src.getHeight() + margin, Bitmap.Config.ARGB_8888);
    
            // The canvas to paint on the image
            Canvas canvas = new Canvas(bmp);
    
            Paint paint = new Paint();
            paint.setColor(glowColor);
    
            // outer glow
            paint.setMaskFilter(new BlurMaskFilter(glowRadius, Blur.OUTER));
            canvas.drawBitmap(alpha, halfMargin, halfMargin, paint);
    
            // original icon
            canvas.drawBitmap(src, halfMargin, halfMargin, null);
    }}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created glow effect imageview application. its working fine, my problem is glow effect
I need to produce a glow effect around one of my imageviews. For that,
I would like to know that how to disable the glow effect of gtkButton
How to provide the outer glow effect to border? <Grid Width=200 Height=200> <Grid.Background> <RadialGradientBrush
I wonder if anybody have an example for Glow effect for font? I tried
I am wondering how I can create an outer glow effect outside a UIView
Is there any jQuery plugin for progressive light glow effect like this ?
You know that sexy glow that surrounds an input field whenever it has focus?
I've got a Glow effect (glowIn) being applied to an object on the roll
I would like to create outer glow effect on CAShapeLayer which I animate later.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.