I have two styles for my button:
<style name="PrimaryButton1" parent="Theme.AppCompat">
<item name="colorButtonNormal">@color/white</item>
<item name="colorControlHighlight">@color/blackt</item>
</style>
<style name="PrimaryButton2" parent="Theme.AppCompat">
<item name="colorButtonNormal">@color/black</item>
<item name="colorControlHighlight">@color/white</item>
</style>
I know i can set a theme in my layout xml like this:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:theme="@style/PrimaryButton1"/>
but i want to change the theme between these two styles when a click event occur.
(the reason i am using themes is changing the background of my button makes it's reveal effect delete)
how can i do this?