I want to create a custom button class :
Using java Syntax Highlighting
- public class ItemList extends Button {
- public ItemList(Context context, String text, int nb) {
- super(context);
- setPadding(0,0,0,0);
- setGravity(Gravity.LEFT);
- setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
- setText(text);
- setTextColor(R.color.orange);
- if (nb % 2 == 0)
- setBackgroundResource(R.color.T1);
- else
- setBackgroundResource(R.color.T2);
- }
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
But the setTextColor doesn't work (not orange)m any idea ?
Thx

