Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Noise effect on Android background

A lot of new Android applications I've been seeing are using a noise effect on their backgrounds, usually a gradient. What interesting is that some applications use radiel gradients throughout their application with this effect, which would require a lot of disk space for the images. Now Android has GradientDrawable which can create gradients very easily. I was thinking about creating the noise effect programmatically.

Has anyone else done this before and if so, how did you go about it? Did you just use an image or write your own custom noise overlay?

like image 220
Martin Avatar asked Aug 16 '10 17:08

Martin


People also ask

Does Android have noise cancellation?

Noise Cancellation is available on desktop/laptop, Android, and iOS for these Google Workspace editions: Business Standard.

What causes background noise?

Background noise is an important concept in setting noise levels. Background noises include environmental noises such as water waves, traffic noise, alarms, extraneous speech, bioacoustic noise from animals, and electrical noise from devices such as refrigerators, air conditioning, power supplies, and motors.


1 Answers

If you just want to eleminate the Color Banding programmaticaly you can do so by overiding the onAttachedToWindow() callback of your activity like this:

@Override
public void onAttachedToWindow() {
  super.onAttachedToWindow();
  Window window = getWindow();
  // Eliminates color banding
  window.setFormat(PixelFormat.RGBA_8888);
}

This worked very well for my normal applications. I didn't test this with widdgets yet.

like image 57
Chris Avatar answered Oct 06 '22 08:10

Chris