FileDocCategorySizeDatePackage
TypeConverter.javaAPI DocAndroid 5.1 API1716Thu Mar 12 22:22:08 GMT 2015android.animation

TypeConverter

public abstract class TypeConverter extends Object
Abstract base class used convert type T to another type V. This is necessary when the value types of in animation are different from the property type.
see
PropertyValuesHolder#setConverter(TypeConverter)

Fields Summary
private Class
mFromClass
private Class
mToClass
Constructors Summary
public TypeConverter(Class fromClass, Class toClass)

        mFromClass = fromClass;
        mToClass = toClass;
    
Methods Summary
public abstract Vconvert(T value)
Converts a value from one type to another.

param
value The Object to convert.
return
A value of type V, converted from value.

java.lang.ClassgetSourceType()
Returns the source conversion type.

        return mFromClass;
    
java.lang.ClassgetTargetType()
Returns the target converted type. Used by the animation system to determine the proper setter function to call.

return
The Class to convert the input to.

        return mToClass;