IT. Expert System.

Android Reference

TransitionDrawable


android.graphics.drawable

Class TransitionDrawable

  • All Implemented Interfaces:
    Drawable.Callback


    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.
        Parameters:
        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.
        Parameters:
        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).
        Overrides:
        draw in class LayerDrawable
        Parameters:
        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.
        Parameters:
        enabled - True to enable cross fading, false otherwise.
      • isCrossFadeEnabled

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


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

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

License.
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 с