j'ai un qutestion (pfff)Comment puis-je changer le thème du bouton dans Android
J'ai un bouton avec un thème personnalisé pour le statut activé et désactive.
<Button
android:id="@+id/btn_on_off"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="activar"
android:textColor="#ffffff"
android:textStyle="bold"
android:theme="@style/**MY_STYLE_A**" />
Je veux changer de thème par source. par exemple pour changer le texte: myButton.setText("new text");
<Button
android:id="@+id/btn_on_off"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="activar"
android:textColor="#ffffff"
android:textStyle="bold"
android:theme="@style/**MY_STYLE_B**" />
Je suis en train, mais je n'ai pas le succès
Vous souhaitez changer de style ou de couleur de bouton? –