Reputation: 93
I am creating a custom button using the following link. I followed every step. https://androidcookbook.com/Recipe.seam?recipeId=3307
Then I created a button the following way :
<Button
android:id="@+id/btnButton1"
android:layout_width="95dp"
android:layout_height="wrap_content"
android:buttonStyle="@style/button"
android:text="CREATE"
android:onClick="createButtonClickHandler"/>
But I see my button has default style. I expected my button has this new fancy custom style.
Upvotes: 1
Views: 205
Reputation: 2938
Don't use buttonStyle
, use just style
:
<Button
android:id="@+id/btnButton1"
android:layout_width="95dp"
android:layout_height="wrap_content"
android:style="@style/button"
android:text="CREATE"
android:onClick="createButtonClickHandler"/>
Reference : https://developer.android.com/guide/topics/ui/themes.html
Upvotes: 1