Last active
October 24, 2016 18:59
-
-
Save Kvest/af06f6c2359a6abeb36798a1bf59f58a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TextColorTransition extends Transition { | |
... | |
private void captureValues(@NonNull TransitionValues transitionValues) { | |
if (transitionValues.view instanceof TextView) { | |
Bundle extraData = (Bundle)transitionValues.view.getTag(R.id.tag_transition_extra_properties); | |
int color; | |
if (extraData != null && extraData.containsKey(PROPNAME_TEXT_COLOR)) { | |
color = extraData.getInt(PROPNAME_TEXT_COLOR); | |
} else { | |
color = ((TextView) transitionValues.view).getCurrentTextColor(); | |
} | |
transitionValues.values.put(PROPNAME_TEXT_COLOR, color); | |
} | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment