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

  • Home
  • SEARCH
  • 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 6771333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:25:10+00:00 2026-05-26T15:25:10+00:00

Several answers mention to use GradientDrawable.setDither(true) to draw smooth gradients in Android. That has

  • 0

Several answers mention to use GradientDrawable.setDither(true) to draw smooth gradients in Android. That has no effect in my code. Any idea what I have to change to get a well looking gradient in my live wallpaper?

GradientDrawable gradient = new GradientDrawable(Orientation.TL_BR, colors);
gradient.setGradientType(GradientDrawable.RADIAL_GRADIENT);
gradient.setGradientRadius(canvas.getWidth() * 2);
gradient.setDither(true);
gradient.setGradientCenter(-0.1f, -0.1f);
gradient.setBounds(cb);
gradient.draw(canvas);
  • 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-05-26T15:25:10+00:00Added an answer on May 26, 2026 at 3:25 pm

    Seeing as you have a Canvas to work with. Here is one option.

    private Bitmap makeRadGrad() {
        RadialGradient gradient = new RadialGradient(200, 200, 200, 0xFFFFFFFF,
                0xFF000000, android.graphics.Shader.TileMode.CLAMP);
        Paint p = new Paint();
        p.setDither(true);
        p.setShader(gradient);
    
        Bitmap bitmap = Bitmap.createBitmap(400, 400, Config.ARGB_8888);
        Canvas c = new Canvas(bitmap);
        c.drawCircle(200, 200, 200, p);
    
        return bitmap;
    }
    

    Result:

    Result

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've seen several questions/answers related to entirely creating a button in code, but not
In a C++ question about optimization and code style , several answers referred to
Several answers to questions about check box binding, for example this one suggest that
After I've asked for a method to combine 2 arrays I got several answers
I've seen several of answers about using Handle or Process Monitor , but I
There are several useful answers on SO regarding prevention of brute forcing a password
After looking at several questions/answers here, I'm not seeing what I think I need.
I've looked at several other SGen-related questions on here and either their answers don't
Basically, what the title says. I have several properties that combine together to really
I've searched SO and found several answers obviously related to my question, and have

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.