You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
add bunch of new java APIs: mostly stubs or copied from AOSP
Many of these classes are only needed to be subclassed by androidx support library, which is used in many android apps
This commit is contained in:
9
src/api-impl/android/animation/Animator.java
Normal file
9
src/api-impl/android/animation/Animator.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package android.animation;
|
||||
|
||||
public class Animator {
|
||||
|
||||
public void setTarget(Object target) {}
|
||||
|
||||
public void start() {}
|
||||
|
||||
}
|
||||
11
src/api-impl/android/animation/AnimatorInflater.java
Normal file
11
src/api-impl/android/animation/AnimatorInflater.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package android.animation;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class AnimatorInflater {
|
||||
|
||||
public static Animator loadAnimator(Context context, int resId) {
|
||||
return new Animator();
|
||||
}
|
||||
|
||||
}
|
||||
56
src/api-impl/android/animation/AnimatorListenerAdapter.java
Normal file
56
src/api-impl/android/animation/AnimatorListenerAdapter.java
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* This adapter class provides empty implementations of the methods from {@link android.animation.Animator.AnimatorListener}.
|
||||
* Any custom listener that cares only about a subset of the methods of this listener can
|
||||
* simply subclass this adapter class instead of implementing the interface directly.
|
||||
*/
|
||||
public abstract class AnimatorListenerAdapter /*implements Animator.AnimatorListener,
|
||||
Animator.AnimatorPauseListener*/ {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void onAnimationRepeat(Animator animation) {
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void onAnimationStart(Animator animation) {
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void onAnimationPause(Animator animation) {
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void onAnimationResume(Animator animation) {
|
||||
}
|
||||
}
|
||||
5
src/api-impl/android/animation/LayoutTransition.java
Normal file
5
src/api-impl/android/animation/LayoutTransition.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package android.animation;
|
||||
|
||||
public class LayoutTransition {
|
||||
|
||||
}
|
||||
33
src/api-impl/android/animation/ValueAnimator.java
Normal file
33
src/api-impl/android/animation/ValueAnimator.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package android.animation;
|
||||
|
||||
public class ValueAnimator {
|
||||
|
||||
public static ValueAnimator ofFloat(float... values) {
|
||||
return new ValueAnimator();
|
||||
}
|
||||
|
||||
public ValueAnimator setDuration(long duration) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void addUpdateListener(AnimatorUpdateListener listener) {}
|
||||
|
||||
public static long getFrameDelay() {
|
||||
return 20; // 20ms frame interval
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementors of this interface can add themselves as update listeners
|
||||
* to an <code>ValueAnimator</code> instance to receive callbacks on every animation
|
||||
* frame, after the current frame's values have been calculated for that
|
||||
* <code>ValueAnimator</code>.
|
||||
*/
|
||||
public static interface AnimatorUpdateListener {
|
||||
/**
|
||||
* <p>Notifies the occurrence of another frame of the animation.</p>
|
||||
*
|
||||
* @param animation The animation which was repeated.
|
||||
*/
|
||||
void onAnimationUpdate(ValueAnimator animation);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user