Android 动画结束后无法激活查看触摸事件

Android 动画结束后无法激活查看触摸事件,android,animation,view,Android,Animation,View,我在按钮上添加动画,使用.SetFillAfter(true)保持屏幕上的最后一个视图。但我发现再也无法通过触摸屏幕上的按钮图标来调用触摸事件功能(但可以通过触摸原始位置来调用) 也在寻找解决这个问题的方法 @Ruivo-通过查看动画源,我发现: /** * Indicates whether or not this animation will affect the transformation * matrix. For instance, a fade animation will

我在按钮上添加动画,使用.SetFillAfter(true)保持屏幕上的最后一个视图。但我发现再也无法通过触摸屏幕上的按钮图标来调用触摸事件功能(但可以通过触摸原始位置来调用)


也在寻找解决这个问题的方法

@Ruivo-通过查看动画源,我发现:

/** 
 * Indicates whether or not this animation will affect the transformation
 * matrix. For instance, a fade animation will not affect the matrix whereas
 * a scale animation will.</p>
 *
 * @return true if this animation will change the transformation matrix
 */
public boolean willChangeTransformationMatrix() {
    // assume we will change the matrix
    return true;
}

/**
 * <p>Indicates whether or not this animation will affect the bounds of the
 * animated view. For instance, a fade animation will not affect the bounds
 * whereas a 200% scale animation will.</p>
 *
 * @return true if this animation will change the view's bounds
 */
public boolean willChangeBounds() {
    // assume we will change the bounds
    return true;
}
/**
*指示此动画是否会影响变换
*矩阵。例如,淡入淡出动画不会影响矩阵
*将显示缩放动画

* *@如果此动画将更改变换矩阵,则返回true */ 公共布尔值willChangeTransformationMatrix(){ //假设我们会改变矩阵 返回true; } /** *指示此动画是否会影响对象的边界 *动画视图。例如,淡入淡出动画不会影响边界 *而200%比例的动画则会

* *@如果此动画将更改视图的边界,则返回true */ 公共布尔值willChangeBounds(){ //假设我们将改变边界 返回true; }
更新:我为这个问题提供了自己的答案。看到这个问题了吗

  anim = AnimationUtils.loadAnimation(this, R.anim.move);
  anim.setInterpolator(this, android.R.anim.accelerate_decelerate_interpolator);
/** 
 * Indicates whether or not this animation will affect the transformation
 * matrix. For instance, a fade animation will not affect the matrix whereas
 * a scale animation will.</p>
 *
 * @return true if this animation will change the transformation matrix
 */
public boolean willChangeTransformationMatrix() {
    // assume we will change the matrix
    return true;
}

/**
 * <p>Indicates whether or not this animation will affect the bounds of the
 * animated view. For instance, a fade animation will not affect the bounds
 * whereas a 200% scale animation will.</p>
 *
 * @return true if this animation will change the view's bounds
 */
public boolean willChangeBounds() {
    // assume we will change the bounds
    return true;
}