17
You have to create your own object "View" like this
public class YourView extends View {
private static final String YOUR_TEXT = "something cool";
private Path _arc;
private Paint _paintText;
public YourView(Context context) {
super(context);
_arc = new Path();
RectF oval = new RectF(50,100,200,250);;
_arc.addArc(oval, -180, 200);
_paintText = new Paint(Paint.ANTI_ALIAS_FLAG);
_paintText.setStyle(Paint.Style.FILL_AND_STROKE);
_paintText.setColor(Color.WHITE);
_paintText.setTextSize(20f);
}
@Override
protected void onDraw(Canvas canvas) {
canvas.drawTextOnPath(YOUR_TEXT, _arc, 0, 20, _paintText);
invalidate();
}
}
and then use it as your TextView :) hope this help