Issue
Is there a way to programmatically change the Toggle on color of a toggle button, not the background color.
I don't see a reference to it in the documentation.
Solution
What about changing style?
styles.xml
<style name="ToggleButton" parent="Base.Widget.AppCompat.Button">
<item name="colorAccent">select your color</item>
<style>
Now set the style on the Toggle button in the layout.
<ToggleButton
android:id="@+id/toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:theme="@style/ToggleButton"/>
Answered By - Shawn
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.