Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckBoxPreference & SwitchPreference have no animation on pre-Lollipop #9

Open
ferrannp opened this issue Nov 18, 2015 · 0 comments
Open

Comments

@ferrannp
Copy link
Owner

As we can read in the README.txt, in order to create a Material looking SwitchPreference we actually use this trick:

<CheckBoxPreference
    android:key="some_key"
    android:title="Hooray!"
    android:widgetLayout="@layout/mp_preference_switch"/>

It works pretty good with just one drawback: There is no animation for pre-Lollipop devices (Switch switches instantly).

There is a post in StackOverflow about it: http://stackoverflow.com/questions/30336635/extending-preference-classes-in-android-lollipop-losing-animation

In the same way, this also happens with a pure CheckBoxPreference:

<CheckBoxPreference
    android:key="some_key"
    android:title="Hooray!" />

There is an opened and forgotten bug about it here: https://code.google.com/p/android/issues/detail?id=85392

@ferrannp ferrannp changed the title SwitchPreference has no animation on pre-Lollipop CheckBoxPreference & SwitchPreference has no animation on pre-Lollipop Nov 18, 2015
@ferrannp ferrannp changed the title CheckBoxPreference & SwitchPreference has no animation on pre-Lollipop CheckBoxPreference & SwitchPreference have no animation on pre-Lollipop Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant