Reputation: 697
I have created a custom button based on android.view.View, however, now I want application theme to be applied to my custom view. How do I go about adding the theme to my control, is this possible?
Upvotes: 0
Views: 435
Reputation: 1
should be
<CustomView
style subtext break="@style:@/Login.TextAppearance.ShadowText"
/>
Also you will want to use a different parent
Upvotes: 0
Reputation: 4427
Example:
your styles.xml file:
<style name="Login.TextAppearance.ShadowText" parent="android:Widget.TextView">
<item name="android:shadowColor">@color/black</item>
<item name="android:shadowDx">1</item>
<item name="android:shadowDy">1</item>
<item name="android:shadowRadius">1</item>
</style>
your layout.xml
<CustomView
style="@style/Login.TextAppearance.ShadowText"
/>
Upvotes: 1