Google は、黒人コミュニティに対する人種平等の促進に取り組んでいます。取り組みを見る

Visibility

abstract class Visibility : Transition
kotlin.Any
   ↳ androidx.transition.Transition
   ↳ androidx.transition.Visibility

This transition tracks changes to the visibility of target views in the start and end scenes. Visibility is determined not just by the View#setVisibility(int) state of views, but also whether views exist in the current view hierarchy. The class is intended to be a utility for subclasses such as Fade, which use this visibility information to determine the specific animations to run when visibility changes occur. Subclasses should implement one or both of the methods onAppear(ViewGroup, TransitionValues, int, TransitionValues, int), onDisappear(ViewGroup, TransitionValues, int, TransitionValues, int) or onAppear(ViewGroup, View, TransitionValues, TransitionValues), onDisappear(ViewGroup, View, TransitionValues, TransitionValues).

Summary

Constants
static Int

Mode used in setMode(int) to make the transition operate on targets that are appearing.

static Int

Mode used in setMode(int) to make the transition operate on targets that are disappearing.

Inherited constants
Public constructors

<init>(@NonNull context: Context, @NonNull attrs: AttributeSet)

Public methods
open Unit
captureEndValues(@NonNull transitionValues: TransitionValues)

open Unit
captureStartValues(@NonNull transitionValues: TransitionValues)

open Animator?
createAnimator(@NonNull sceneRoot: ViewGroup, @Nullable startValues: TransitionValues?, @Nullable endValues: TransitionValues?)

open Int

Returns whether appearing and/or disappearing Views are supported.

open Array<String!>?

open Boolean
isTransitionRequired(@Nullable startValues: TransitionValues?, @Nullable newValues: TransitionValues?)

open Boolean

Returns whether the view is 'visible' according to the given values object.

open Animator?
onAppear(sceneRoot: ViewGroup!, startValues: TransitionValues!, startVisibility: Int, endValues: TransitionValues!, endVisibility: Int)

The default implementation of this method does nothing.

open Animator?
onAppear(sceneRoot: ViewGroup!, view: View!, startValues: TransitionValues!, endValues: TransitionValues!)

The default implementation of this method returns a null Animator.

open Animator?
onDisappear(sceneRoot: ViewGroup!, startValues: TransitionValues!, startVisibility: Int, endValues: TransitionValues!, endVisibility: Int)

The default implementation of this method does nothing.

open Animator?
onDisappear(sceneRoot: ViewGroup!, view: View!, startValues: TransitionValues!, endValues: TransitionValues!)

The default implementation of this method returns a null Animator.

open Unit
setMode(mode: Int)

Changes the transition to support appearing and/or disappearing Views, depending on mode.

Inherited functions

Constants

MODE_IN

static val MODE_IN: Int

Mode used in setMode(int) to make the transition operate on targets that are appearing. Maybe be combined with MODE_OUT to target Visibility changes both in and out.

Value: 0x1

MODE_OUT

static val MODE_OUT: Int

Mode used in setMode(int) to make the transition operate on targets that are disappearing. Maybe be combined with MODE_IN to target Visibility changes both in and out.

Value: 0x2

Public constructors

<init>

Visibility()

<init>

Visibility(
    @NonNull context: Context,
    @NonNull attrs: AttributeSet)

Public methods

captureEndValues

open fun captureEndValues(@NonNull transitionValues: TransitionValues):