I have a Button
as follows:
<Button
android:id="@+id/previousQuestion"
style="?android:attr/buttonBarButtonStyle"
android:text="@string/questions_activity_previous_button"
android:onClick="previousButton_OnClick"
/>
but I want to add more styling attribute which makes the Button
hard to maintain later on so instead, I was going to put them into its own Style
resource.
The question is "How am I going to still use ?android:attr/buttonBarButtonStyle
?" I tried to do the following but didn't work:
<style name="PreviousQuestionButtonStyle" parent="android:attr/buttonBarButtonStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_alignParentLeft">true</item>
</style>
Any ideas?
Try to replace this
<style name="PreviousQuestionButtonStyle" parent="android:attr/buttonBarButtonStyle">
with this
<style name="PreviousQuestionButtonStyle" parent="@android:style/ButtonBar">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With