Java Code Examples for android.graphics.drawable.Drawable#setChangingConfigurations()
The following examples show how to use
android.graphics.drawable.Drawable#setChangingConfigurations() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DrawableUtils.java From ImageLoader with Apache License 2.0 | 5 votes |
/** * Copies various properties from one drawable to the other. * @param to drawable to copy properties to * @param from drawable to copy properties from */ public static void copyProperties(Drawable to, Drawable from) { if (from == null || to == null || to == from) { return; } to.setBounds(from.getBounds()); to.setChangingConfigurations(from.getChangingConfigurations()); to.setLevel(from.getLevel()); to.setVisible(from.isVisible(), /* restart */ false); to.setState(from.getState()); }
Example 2
Source File: DrawableUtils.java From FanXin-based-HuanXin with GNU General Public License v2.0 | 5 votes |
/** * Copies various properties from one drawable to the other. * @param to drawable to copy properties to * @param from drawable to copy properties from */ public static void copyProperties(Drawable to, Drawable from) { if (from == null || to == null || to == from) { return; } to.setBounds(from.getBounds()); to.setChangingConfigurations(from.getChangingConfigurations()); to.setLevel(from.getLevel()); to.setVisible(from.isVisible(), /* restart */ false); to.setState(from.getState()); }
Example 3
Source File: DrawableUtils.java From fresco with MIT License | 5 votes |
/** * Copies various properties from one drawable to the other. * * @param to drawable to copy properties to * @param from drawable to copy properties from */ public static void copyProperties(@Nullable Drawable to, @Nullable Drawable from) { if (from == null || to == null || to == from) { return; } to.setBounds(from.getBounds()); to.setChangingConfigurations(from.getChangingConfigurations()); to.setLevel(from.getLevel()); to.setVisible(from.isVisible(), /* restart */ false); to.setState(from.getState()); }