Can anybody tell me how to create our own custom text view in android? -
hi
can tell me how create our own custom text view in android? want set different colors textview font. can give example?
whatever want:
public class simpletextview extends textview { private static int color=color.red; public simpletextview(context context) { super(context); this.settextcolor(color) } public simpletextview(context context, attributeset attrs) { super(context, attrs); this.settextcolor(color) } public simpletextview(context context, attributeset attrs, int defstyle) { super(context, attrs, defstyle); this.settextcolor(color) } public static void setglobalcolor(int gcolor) { color=gcolor; } }
so anytime can change color of textviews globally.
Comments
Post a Comment