Drawable jumpToCurrentState - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Drawable jumpToCurrentState method.

This code example shows how to use the following methods:jumpToCurrentState
    } 
 
    @Override 
    public void jumpDrawablesToCurrentState() { 
        super.jumpDrawablesToCurrentState(); 
        if (mBackground != null) mBackground.jumpToCurrentState();
    } 
 
    @Override 
    protected void drawableStateChanged() { 
        Drawable d = mBackground;
        if (d != null && d.isStateful()) {
            d.setState(getDrawableState());
        } 
        super.drawableStateChanged(); 
    } 
 
    @Override 
    public void draw(Canvas canvas) {
        final Drawable background = mBackground;
7
CodeRank
This code example shows how to use the following methods:jumpToCurrentState
 
    @Override 
    public void jumpDrawablesToCurrentState() { 
        super.jumpDrawablesToCurrentState(); 
        if (mBackground != null) {
            mBackground.jumpToCurrentState();
        } 
        if (mStackedBackground != null) {
            mStackedBackground.jumpToCurrentState();
        } 
        if (mSplitBackground != null) {
            mSplitBackground.jumpToCurrentState();
        } 
    } 
 
    /** 
     * @hide 
     */ 
    @Override 
    public void onResolveDrawables(int layoutDirection) {
6
CodeRank
This code example shows how to use the following methods:jumpToCurrentState
        return mDrawable.getState();
    } 
 
    @Override 
    public void jumpToCurrentState() { 
        mDrawable.jumpToCurrentState();
    } 
 
    @Override 
    public Drawable getCurrent() {
        return mDrawable.getCurrent();
    } 
 
    @Override 
    public boolean setVisible(boolean visible, boolean restart) {
        return super.setVisible(visible, restart) || mDrawable.setVisible(visible, restart);
    } 
 
    @Override 
    public int getOpacity() { 
6
CodeRank
This code example shows how to use the following methods:jumpToCurrentState
    } 
 
    @Override 
    public void jumpDrawablesToCurrentState() { 
        super.jumpDrawablesToCurrentState(); 
        if (mBackground != null) mBackground.jumpToCurrentState();
    } 
 
    @Override 
    protected void drawableStateChanged() { 
        Drawable d = mBackground;
        if (d != null && d.isStateful()) {
            d.setState(getDrawableState());
        } 
        super.drawableStateChanged(); 
    } 
 
    @Override 
    public void draw(Canvas canvas) {
        final Drawable background = mBackground;
6
CodeRank
This code example shows how to use the following methods:jumpToCurrentState
    @TargetApi(ApiHelper.VERSION_CODES.HONEYCOMB) 
    @Override 
    public void jumpDrawablesToCurrentState() { 
        super.jumpDrawablesToCurrentState(); 
        mThumbDrawable.jumpToCurrentState();
        mTrackDrawable.jumpToCurrentState();
    } 
 
    @TargetApi(ApiHelper.VERSION_CODES.ICE_CREAM_SANDWICH) 
    @Override 
    public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
        super.onInitializeAccessibilityEvent(event);
        event.setClassName(Switch.class.getName());
    } 
 
    @TargetApi(ApiHelper.VERSION_CODES.ICE_CREAM_SANDWICH) 
    @Override 
    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
        super.onInitializeAccessibilityNodeInfo(info);
        info.setClassName(Switch.class.getName());
5
CodeRank
This code example shows how to use the following methods:jumpToCurrentState
 
    @Override 
    public void jumpDrawablesToCurrentState() { 
        super.jumpDrawablesToCurrentState(); 
        if (mProgressDrawable != null) mProgressDrawable.jumpToCurrentState();
        if (mIndeterminateDrawable != null) mIndeterminateDrawable.jumpToCurrentState();
    } 
 
    @Override 
    public void postInvalidate() { 
        if (!mNoInvalidate) {
            super.postInvalidate(); 
        } 
    } 
 
    private class RefreshProgressRunnable implements Runnable {
 
        private int mId;
        private int mProgress;
        private boolean mFromUser;
5
CodeRank
This code example shows how to use the following methods:jumpToCurrentState, setAlpha
jumpToCurrentState Method Overview
If this Drawable does transition animations between states, ask that it immediately jump to the current state and skip any active animations.
See Code Examples for other Android Drawable Methods: