Reputation: 5618
Thats how my .axml looks like:
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="2dip"
android:paddingBottom="2dip"
android:paddingLeft="5dip"
android:textSize="18dp"
android:text="Kommentare"
style="?android:attr/listSeparatorTextViewStyle" />
As you see I'm accessing a style attribute that's defined in a style theme (?android:attr/listSeparatorTextViewStyle
)
Now I would like to separate my own style:
<style name="TextViewTitleBar" parent="android:Theme">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:paddingTop">2dip</item>
<item name="android:paddingBottom">2dip</item>
<item name="android:paddingLeft">5dip</item>
<item name="android:textSize">18dp</item>
</style>
and use it like:
style="@style/TextViewTitleBar"
in my .axml , without losing the android defined style with the ?
at the beginning.
How to combine/mix these styles?
Upvotes: 1
Views: 481
Reputation: 5373
You can set the parent to
@android:attr/listSeparatorTextViewStyle
Upvotes: 2