public class RoundedBackgroundSpan
extends android.text.style.ReplacementSpan
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CORNER_RADIUS |
| Constructor and Description |
|---|
RoundedBackgroundSpan(int backgroundColor,
int textColor) |
RoundedBackgroundSpan(int backgroundColor,
int textColor,
int cornerRadius) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(android.graphics.Canvas canvas,
java.lang.CharSequence text,
int start,
int end,
float x,
int top,
int y,
int bottom,
android.graphics.Paint paint) |
int |
getSize(android.graphics.Paint paint,
java.lang.CharSequence text,
int start,
int end,
android.graphics.Paint.FontMetricsInt fm) |
public static final int DEFAULT_CORNER_RADIUS
public RoundedBackgroundSpan(int backgroundColor,
int textColor,
int cornerRadius)
public RoundedBackgroundSpan(int backgroundColor,
int textColor)
public void draw(android.graphics.Canvas canvas,
java.lang.CharSequence text,
int start,
int end,
float x,
int top,
int y,
int bottom,
android.graphics.Paint paint)
draw in class android.text.style.ReplacementSpanpublic int getSize(android.graphics.Paint paint,
java.lang.CharSequence text,
int start,
int end,
android.graphics.Paint.FontMetricsInt fm)
getSize in class android.text.style.ReplacementSpan