Questions tagged [android-paint]
68 questions
1
vote
1 answer
Modifying bitmap is very slow...Is there any other way for this?
I am here trying to convert my current bitmap in black and white bitmap by writing following method.But it takes very long time to convert because of its for loop of every pixels.Am i wrong here any where? or is there any other way to do this?..Help…

Chirag
- 27
- 7
1
vote
1 answer
How to change TexView Blur color created with BlurMaskFilter.Blur?
I want to change the (inner) blur of this TextView from white to another color using BlurMaskFilter.Blur
...
blurMaskFilterText = (TextView)findViewById(R.id.textView1);
BlurMaskFilter filter = new…

Asme Just
- 1,287
- 5
- 27
- 42
1
vote
1 answer
Drawing only horizontal, vertical and diagonal lines in Android
I'm developing a wordsearch game. Table Layout contains textviews. Textviews display the characters. When the user finds a word in any one of the 8 directions: TopToBottom, BottomToTop, LeftToRight, RightToLeft, TopToBottomRight, BottomToTopLeft,…

Balaji A
- 13
- 3
1
vote
1 answer
Edges of ShapeDrawable oval (stroke-style) are cut (Android Studio)
I'm new to Android Studio and at the moment I'm trying to create an oval (not solid, just stroke) of random color, stroke width and size programmatically:
long randomSeedm = System.currentTimeMillis();
Random random = new…

Andre Kemper
- 11
- 3
1
vote
1 answer
Add markerwater in Android using Glide
I have the code to add a bitmap on imageview:
try {
Glide.with(imagen.getContext())
.load(item.getIdImagen())
.into(imagen);
} catch(Exception e) {
}
I also have the code that would add the…

ZottoSL
- 170
- 1
- 12
1
vote
0 answers
color blending and porterduffxfermode effect
int color1 = 0xDDfbc2ba;
int color2 = 0xDD7a6c3e;
int mixColor = mixTwoColors(color1,color2,0.5f);
public static int mixTwoColors( int color1, int color2, float amount )
{
final byte ALPHA_CHANNEL = 24;
final byte…

ng2b30
- 351
- 6
- 18
1
vote
1 answer
Classify the hair and face in android
I want to Classify the hair and face in android so that I can apply some cosmetic effects on the face, without affecting the hair.
However, everyone has different hair style and some of their hair color are close to their face color. Nowadays, most…

ng2b30
- 351
- 6
- 18
1
vote
0 answers
How to set drawable points and thumb on a seekbar?
I have no idea how I must make drawable points and thumb. I've read a lot of information about Canvas drawing, Paint, etc. But it didn't help.
I need to make Seekbar like seekbar in the pictures but with drawable points and drawable thumb. I can't…

illuSi0n
- 11
- 3
1
vote
0 answers
Drawing navigation path on ImageView using Canvas
In my application, I need to show navigation path between an array of points on ImageView using Canvas. I am able to draw a path on an ImageView but I need to draw similar to this image:
Is it possible to draw a navigation path like this using…

MinnuKaAnae
- 1,646
- 3
- 23
- 35
1
vote
2 answers
Getting null pointer exception virtual method 'long android.graphics.Paint.getNativeInstance()' on a null object reference
I am trying to create a todo list app. I am adding entered text to the listitems on the enter, it's working fine without the style.
After adding style with paint and drawing its giving null pointer exception. I am initializing all the drawing and…

sasikanth
- 129
- 3
- 12
0
votes
0 answers
How does TextView display (changes to) its text?
I am wondering how android's android.widget.TextView is working. I went through the code of the class and searched for explanations, however, i was unable to figure out the key questions . Particularly i am interested in two parts:
How is text…

diwasip777
- 15
- 4
0
votes
0 answers
Is it correct to create Paints in the method, which are rarely used instead of keeping them as fields in the view?
I make a view with many thermometers (8 is always visible on the screen). Each thermometer is a bitmap that needs 6 paints to fill. Still other parts of the view require 8 paints. So, is it right to keep paints for thermometers as view fields, if…

Andr8880
- 1
0
votes
1 answer
How to use android canvas to draw a striped rectangle?
rectangles
I already drew the left rounded rectangle. I need to insert some lines horizontally for it to become a striped rectangle. How can I achieve this?
I already tried to use path and draw a line. But nothing worked how it was supposed to. Can…
0
votes
0 answers
Android Bitmapshader separating the colors of a two-color bitmap
I have created a bitmap that I want to use for a BitmapShader.
The bitmap and the result after using it with a BitmapShader and a paint object looks
as follows: Ignore the word 'new game' on the left picture. The bitmap does not have that word in…

i_o
- 777
- 9
- 25
0
votes
1 answer
Android. How to paint all area around of rectangle?
I have custom view and inside onDraw I need to draw in canvas rectangle. I have RectF with all coordinates. And now I need to paint the entire area around the rectangle in a different color. Is it possible to do this using RectF ?
Please help me.

testivanivan
- 967
- 13
- 36