use of com.android.tools.layoutlib.annotations.LayoutlibDelegate in project android_frameworks_base by DirtyUnicorns.
the class PathParser_Delegate method nParseStringForPath.
@LayoutlibDelegate
static /*package*/
void nParseStringForPath(long pathPtr, @NonNull String pathString, int stringLength) {
Path_Delegate path_delegate = Path_Delegate.getDelegate(pathPtr);
if (path_delegate == null) {
return;
}
assert pathString.length() == stringLength;
PathDataNode.nodesToPath(createNodesFromPathData(pathString), path_delegate);
}
use of com.android.tools.layoutlib.annotations.LayoutlibDelegate in project android_frameworks_base by DirtyUnicorns.
the class Region_Delegate method nativeSetPath.
@LayoutlibDelegate
static /*package*/
boolean nativeSetPath(long native_dst, long native_path, long native_clip) {
Region_Delegate dstRegion = sManager.getDelegate(native_dst);
if (dstRegion == null) {
return true;
}
Path_Delegate path = Path_Delegate.getDelegate(native_path);
if (path == null) {
return true;
}
dstRegion.mArea = new Area(path.getJavaShape());
Region_Delegate clip = sManager.getDelegate(native_clip);
if (clip != null) {
dstRegion.mArea.subtract(clip.getJavaArea());
}
return dstRegion.mArea.getBounds().isEmpty() == false;
}
use of com.android.tools.layoutlib.annotations.LayoutlibDelegate in project android_frameworks_base by DirtyUnicorns.
the class AnimatedVectorDrawable_Delegate method nCreatePathPropertyHolder.
@LayoutlibDelegate
static /*package*/
long nCreatePathPropertyHolder(long nativePtr, int propertyId, float startValue, float endValue) {
VFullPath_Delegate path = VNativeObject.getDelegate(nativePtr);
Consumer<Float> setter = path.getFloatPropertySetter(propertyId);
return sHolders.addNewDelegate(FloatPropertySetter.of(setter, startValue, endValue));
}
use of com.android.tools.layoutlib.annotations.LayoutlibDelegate in project android_frameworks_base by DirtyUnicorns.
the class AnimatedVectorDrawable_Delegate method nAddAnimator.
@LayoutlibDelegate
static /*package*/
void nAddAnimator(long setPtr, long propertyValuesHolder, long nativeInterpolator, long startDelay, long duration, int repeatCount) {
PropertySetter holder = sHolders.getDelegate(propertyValuesHolder);
if (holder == null || holder.getValues() == null) {
return;
}
ObjectAnimator animator = new ObjectAnimator();
animator.setValues(holder.getValues());
animator.setInterpolator(NativeInterpolatorFactoryHelper_Delegate.getDelegate(nativeInterpolator));
animator.setStartDelay(startDelay);
animator.setDuration(duration);
animator.setRepeatCount(repeatCount);
animator.setTarget(holder);
animator.setPropertyName(holder.getValues().getPropertyName());
AnimatorSetHolder set = sAnimatorSets.getDelegate(setPtr);
assert set != null;
set.addAnimator(animator);
}
use of com.android.tools.layoutlib.annotations.LayoutlibDelegate in project android_frameworks_base by DirtyUnicorns.
the class AnimatedVectorDrawable_Delegate method nCreateGroupPropertyHolder.
@LayoutlibDelegate
static /*package*/
long nCreateGroupPropertyHolder(long nativePtr, int propertyId, float startValue, float endValue) {
VGroup_Delegate group = VNativeObject.getDelegate(nativePtr);
Consumer<Float> setter = group.getPropertySetter(propertyId);
return sHolders.addNewDelegate(FloatPropertySetter.of(setter, startValue, endValue));
}
Aggregations