I\'ve made a SwitchPreference for my app\'s preferences.
The problem is that the SwitchPreference is not showing animation whe
I had this problem too,and I had tried every solution noticed in stackoverflow but still can't solve the questions.It's seems an android bug when you try to extend subclass of Preference,the animation will disappear. See here for their bugtracker entry.
Finally I found the solution, I create a class extends Preference,and set layout which contain a switch component, and deal with the click event in custom class, the switch's animation works fine.
xml file mostly like:
android:layout="@layout/custom_switch_layout"
android:key="new_switch"
android:title="pref_switch_title"