I have a TextView and I want to apply a Style which I use for all TextView elements plus another style which I only use within a specific Activity. Is there any possibility to do that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A style under Android can have a parent style.
So just have
MyActivityTextViewdefineGeneralTextViewas parent style, and change/add style properties.Then you can use
MyActivityTextViewfor some views andGeneralTextViewfor the others.It’s described in Defining Styles.