Add some stubs needed by android material library

This commit is contained in:
Julian Winkler
2023-08-22 14:41:01 +02:00
parent ca975a0e7c
commit 960930a348
42 changed files with 428 additions and 19 deletions

View File

@@ -2,6 +2,9 @@ package android.animation;
public class Animator {
public interface AnimatorListener {
}
public void setTarget(Object target) {}
public void start() {}

View File

@@ -5,7 +5,7 @@ import android.content.Context;
public class AnimatorInflater {
public static Animator loadAnimator(Context context, int resId) {
return new Animator();
return new ObjectAnimator();
}
}

View File

@@ -0,0 +1,5 @@
package android.animation;
public class AnimatorSet extends Animator {
}

View File

@@ -0,0 +1,9 @@
package android.animation;
public class ObjectAnimator extends ValueAnimator {
public String getPropertyName() {
return null;
}
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.animation;
/**
* A time interpolator defines the rate of change of an animation. This allows animations
* to have non-linear motion, such as acceleration and deceleration.
*/
public interface TimeInterpolator {
/**
* Maps a value representing the elapsed fraction of an animation to a value that represents
* the interpolated fraction. This interpolated value is then multiplied by the change in
* value of an animation to derive the animated value at the current elapsed animation time.
*
* @param input A value between 0 and 1.0 indicating our current point
* in the animation where 0 represents the start and 1.0 represents
* the end
* @return The interpolation value. This value can be more than 1.0 for
* interpolators which overshoot their targets, or less than 0 for
* interpolators that undershoot their targets.
*/
float getInterpolation(float input);
}

View File

@@ -0,0 +1,5 @@
package android.animation;
public interface TypeEvaluator {
}

View File

@@ -1,6 +1,8 @@
package android.animation;
public class ValueAnimator {
final class PropertyValuesHolder{}
public class ValueAnimator extends Animator {
public static ValueAnimator ofFloat(float... values) {
return new ValueAnimator();
@@ -16,6 +18,19 @@ public class ValueAnimator {
return 20; // 20ms frame interval
}
public PropertyValuesHolder[] getValues() {
return null;
}
public long getStartDelay() {return 0;}
public long getDuration() {return 0;}
public TimeInterpolator getInterpolator() {return null;}
public int getRepeatCount() {return 0;}
public int getRepeatMode() {return 0;}
public void setInterpolator(TimeInterpolator interpolator) {}
public void addListener(Animator.AnimatorListener listener) {}
public void setFloatValues(float[] values) {}
/**
* Implementors of this interface can add themselves as update listeners
* to an <code>ValueAnimator</code> instance to receive callbacks on every animation