IT. Expert System.

Android Reference


Class TransitionDrawable

  • All Implemented Interfaces:

    public class TransitionDrawable
    extends LayerDrawable
    implements Drawable.Callback
    An extension of LayerDrawables that is intended to cross-fade between the first and second layer. To start the transition, call startTransition(int). To display just the first layer, call resetTransition().

    It can be defined in an XML file with the <transition> element. Each Drawable in the transition is defined in a nested <item>. For more information, see the guide to Drawable Resources.

    • Constructor Detail

      • TransitionDrawable

        public TransitionDrawable(Drawable[] layers)
        Create a new transition drawable with the specified list of layers. At least 2 layers are required for this drawable to work properly.
    • Method Detail

      • startTransition

        public void startTransition(int durationMillis)
        Begin the second layer on top of the first layer.
        durationMillis - The length of the transition in milliseconds
      • resetTransition

        public void resetTransition()
        Show only the first layer.
      • reverseTransition

        public void reverseTransition(int duration)
        Reverses the transition, picking up where the transition currently is. If the transition is not currently running, this will start the transition with the specified duration. If the transition is already running, the last known duration will be used.
        duration - The duration to use if no transition is running.
      • draw

        public void draw(Canvas canvas)
        Description copied from class: Drawable
        Draw in its bounds (set via setBounds) respecting optional effects such as alpha (set via setAlpha) and color filter (set via setColorFilter).
        draw in class LayerDrawable
        canvas - The canvas to draw into
      • setCrossFadeEnabled

        public void setCrossFadeEnabled(boolean enabled)
        Enables or disables the cross fade of the drawables. When cross fade is disabled, the first drawable is always drawn opaque. With cross fade enabled, the first drawable is drawn with the opposite alpha of the second drawable. Cross fade is disabled by default.
        enabled - True to enable cross fading, false otherwise.
      • isCrossFadeEnabled

        public boolean isCrossFadeEnabled()
        Indicates whether the cross fade is enabled for this transition.
        True if cross fading is enabled, false otherwise.


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 127 / 159136691. Delta: 0.10048 с