Example usage for android.support.v4.graphics.drawable DrawableCompat setHotspot

List of usage examples for android.support.v4.graphics.drawable DrawableCompat setHotspot

Introduction

In this page you can find the example usage for android.support.v4.graphics.drawable DrawableCompat setHotspot.

Prototype

public static void setHotspot(Drawable drawable, float f, float f2) 

Source Link

Usage

From source file:codetail.graphics.drawables.LayerDrawable.java

@Override
public void setHotspot(float x, float y) {
    final ChildDrawable[] array = mLayerState.mChildren;
    final int N = mLayerState.mNum;
    for (int i = 0; i < N; i++) {
        DrawableCompat.setHotspot(array[i].mDrawable, x, y);
    }//  w  ww .j a v  a 2  s  .  com
}

From source file:com.acious.android.paginationseekbar.PaginationSeekBar.java

private void setHotspot(float x, float y) {
    DrawableCompat.setHotspot(mRipple, x, y);
}

From source file:android.support.v7.widget.SwitchCompat.java

@Override
public void drawableHotspotChanged(float x, float y) {
    if (Build.VERSION.SDK_INT >= 21) {
        super.drawableHotspotChanged(x, y);
    }//from w  w w  .  j a  v a2s . c  om

    if (mThumbDrawable != null) {
        DrawableCompat.setHotspot(mThumbDrawable, x, y);
    }

    if (mTrackDrawable != null) {
        DrawableCompat.setHotspot(mTrackDrawable, x, y);
    }
}

From source file:org.mariotaku.multivalueswitch.library.MultiValueSwitch.java

@Override
public void drawableHotspotChanged(float x, float y) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        super.drawableHotspotChanged(x, y);
    }/*w w w. j a v a2  s. com*/

    if (mThumbDrawable != null) {
        DrawableCompat.setHotspot(mThumbDrawable, x, y);
    }

    if (mTrackDrawable != null) {
        DrawableCompat.setHotspot(mTrackDrawable, x, y);
    }
}

From source file:rikka.akashitoolkit.ui.widget.IconSwitchCompat.java

@Override
public void drawableHotspotChanged(float x, float y) {
    if (Build.VERSION.SDK_INT >= 21) {
        super.drawableHotspotChanged(x, y);
    }//from ww w . j av a 2  s.  c o m

    if (mThumbDrawable != null) {
        DrawableCompat.setHotspot(mThumbDrawable, x, y);
    }

    if (mTrackDrawable != null) {
        DrawableCompat.setHotspot(mTrackDrawable, x, y);
    }

    if (mIconDrawable != null) {
        DrawableCompat.setHotspot(mIconDrawable, x, y);
    }
}

From source file:com.mixiaoxiao.support.widget.SmoothSwitch.java

@Override
public void drawableHotspotChanged(float x, float y) {
    super.drawableHotspotChanged(x, y);

    if (mThumbDrawable != null) {
        DrawableCompat.setHotspot(mThumbDrawable, x, y);
    }/* w ww  .j a  va 2 s .c  o  m*/

    if (mTrackDrawable != null) {
        DrawableCompat.setHotspot(mTrackDrawable, x, y);
    }
}