Методы: Onprogress, Oning of Class WindowinsetSanimationCompat.callback не звонитJAVA

Программисты JAVA общаются здесь
Anonymous
Методы: Onprogress, Oning of Class WindowinsetSanimationCompat.callback не звонит

Сообщение Anonymous »

Я пытаюсь использовать viewcompat.setWindowinsetSanimationCallback < /p>

Код: Выделить всё

final WindowInsetsAnimationCompat.Callback insetsWithKeyboardAnimationCallback = new InsetsWithKeyboardAnimationCallback(getWindow(), imageLayout);

ViewCompat.setWindowInsetsAnimationCallback(parentView, insetsWithKeyboardAnimationCallback);

// InsetsWithKeyboardAnimationCallback class
public class InsetsWithKeyboardAnimationCallbackHelper extends WindowInsetsAnimationCompat.Callback implements OnApplyWindowInsetsListener {
private final Window window;
private final View view;
private final String TAG = this.getClass().getSimpleName();

public InsetsWithKeyboardAnimationCallbackHelper(Window window, View view) {
super(WindowInsetsAnimationCompat.Callback.DISPATCH_MODE_CONTINUE_ON_SUBTREE);

this.window = window;
this.view = view;
}

@Override
public void onPrepare(@NonNull WindowInsetsAnimationCompat animation) {
Log.d(TAG, "onPrepare");
super.onPrepare(animation);
}

@NonNull
@Override
public WindowInsetsCompat onProgress(@NonNull WindowInsetsCompat insets, @NonNull List runningAnimations) {
Log.d(TAG, "onProgress");

return insets;
}

@Override
public void onEnd(@NonNull WindowInsetsAnimationCompat animation) {
Log.d(TAG, "onEnd");
super.onEnd(animation);
}
}
Если я открою клавиатуру, методы OnProgress и Onend не называются, но если я перейду на фоновый>

Подробнее здесь: https://stackoverflow.com/questions/796 ... llback-don

Вернуться в «JAVA»