[android-developers] Re: Question about writing a custom button

2009-02-10 Thread skink
On 10 Lut, 16:34, ying lcs ying...@gmail.com wrote: Hi, I am writing a custom button. In the android button, I can customize my button like this:         Button android:id=@+id/subtract_button                 android:text=-         / And in the Button.java source code, it gets the

[android-developers] Re: Question about writing a custom button

2009-02-10 Thread ying lcs
Thank you. But in my custom button, how can I get the attribute defined in android? For example, if MyButton inherits from Button, how can I get 'TextAppearance_textColor in my MyButton class? This is how the android's Button class get the TextAppearance_textColor case

[android-developers] Re: Question about writing a custom button

2009-02-10 Thread skink
But I can't do the same in MyButton since the 'com.android.internal.R.styleable.TextAppearance_textColor' is not accessible. So can you please tell me how can I get the textColor in MyButton? hi, i think you can use android.R.styleable.TextAppearance_textColor