Added in API level 31

UiTranslationStateCallback

public interface UiTranslationStateCallback

android.view.translation.UiTranslationStateCallback


Callback for listening to UI Translation state changes. See UiTranslationManager.registerUiTranslationStateCallback(java.util.concurrent.Executor, android.view.translation.UiTranslationStateCallback).

Summary

Public methods

abstract void onFinished()

The UI Translation session has ended.

abstract void onPaused()
default void onResumed(ULocale sourceLocale, ULocale targetLocale)
default void onStarted(ULocale sourceLocale, ULocale targetLocale)

This is also called if either the requested sourceLocale or targetLocale has changed.

Public methods

onFinished

Added in API level 31
public abstract void onFinished ()

The UI Translation session has ended.

onPaused

Added in API level 31
public abstract void onPaused ()

onResumed

Added in API level 31
public void onResumed (ULocale sourceLocale, 
                ULocale targetLocale)

Parameters
sourceLocale ULocale: This value cannot be null.

targetLocale ULocale: This value cannot be null.

onStarted

Added in API level 31
public void onStarted (ULocale sourceLocale, 
                ULocale targetLocale)

This is also called if either the requested sourceLocale or targetLocale has changed.

Parameters
sourceLocale ULocale: This value cannot be null.

targetLocale ULocale: This value cannot be null.