I have a standard unaltered Switch class on every list item in a RecyclerView
(in order to toggle an item on or off). Usually switches in Android have a nice default animation with the switch sliding into position and a small bubble animation appears. In my case, the switch just jumps into the final position without any animation. Here is my layout for it:
<Switch
android:id="@+id/alarm_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:checked="true"
android:focusable="false"
android:focusableInTouchMode="false"
android:animateLayoutChanges="true"
android:padding="10dp" />
The property android:animateLayoutChanges="true"
does not have any effect. Tried on Android M and O. How can I enable the standard animation?