本文整理了Java中android.graphics.drawable.Drawable.jumpToCurrentState()
方法的一些代码示例,展示了Drawable.jumpToCurrentState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.jumpToCurrentState()
方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:jumpToCurrentState
暂无
代码示例来源:origin: facebook/litho
@Override
public void jumpToCurrentState() {
mDrawable.jumpToCurrentState();
}
代码示例来源:origin: seven332/EhViewer
public void jumpToCurrentState() {
this.mDrawable.jumpToCurrentState();
}
代码示例来源:origin: nickbutcher/plaid
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (foreground != null) foreground.jumpToCurrentState();
}
代码示例来源:origin: nickbutcher/plaid
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (mForeground != null) mForeground.jumpToCurrentState();
}
代码示例来源:origin: nickbutcher/plaid
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (foreground != null) foreground.jumpToCurrentState();
}
代码示例来源:origin: google/ExoPlayer
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (scrubberDrawable != null) {
scrubberDrawable.jumpToCurrentState();
}
}
代码示例来源:origin: rey5137/material
@Override
public void jumpToCurrentState() {
super.jumpToCurrentState();
stop();
}
代码示例来源:origin: xinghongfei/LookLook
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (foreground != null) foreground.jumpToCurrentState();
}
代码示例来源:origin: ZieIony/Carbon
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (drawable != null) drawable.jumpToCurrentState();
}
代码示例来源:origin: ZieIony/Carbon
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (drawable != null) drawable.jumpToCurrentState();
}
代码示例来源:origin: DreaminginCodeZH/MaterialProgressBar
@Override
public void jumpToCurrentState() {
boolean changed = false;
if (mLastDrawable != null) {
mLastDrawable.jumpToCurrentState();
mLastDrawable = null;
mLastIndex = -1;
changed = true;
}
if (mCurrDrawable != null) {
mCurrDrawable.jumpToCurrentState();
if (mHasAlpha) {
mCurrDrawable.setAlpha(mAlpha);
}
}
if (mExitAnimationEnd != 0) {
mExitAnimationEnd = 0;
changed = true;
}
if (mEnterAnimationEnd != 0) {
mEnterAnimationEnd = 0;
changed = true;
}
if (changed) {
invalidateSelf();
}
}
代码示例来源:origin: ZieIony/Carbon
@Override
public void jumpToCurrentState() {
super.jumpToCurrentState();
if (animator != null)
animator.end();
invalidateSelf();
}
代码示例来源:origin: facebook/litho
@Test
public void testJumpDrawablesToCurrentState() {
mHost.jumpDrawablesToCurrentState();
Drawable d1 = mock(ColorDrawable.class);
when(d1.getBounds()).thenReturn(new Rect());
mount(0, d1);
Drawable d2 = mock(ColorDrawable.class);
when(d2.getBounds()).thenReturn(new Rect());
mount(1, d2);
View v1 = mock(View.class);
mount(2, v1);
mHost.jumpDrawablesToCurrentState();
verify(d1, times(1)).jumpToCurrentState();
verify(d2, times(1)).jumpToCurrentState();
}
代码示例来源:origin: aa112901/remusic
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
if (ThemeUtils.isSkipAnimatedSelector()) {
Drawable drawable = CompoundButtonCompat.getButtonDrawable(this);
try {
if (ThemeUtils.getWrapperDrawable(drawable) instanceof AnimatedStateListDrawable) {
drawable.jumpToCurrentState();
}
} catch (NoClassDefFoundError error) {
error.printStackTrace();
}
}
}
代码示例来源:origin: aa112901/remusic
@Override
protected void drawableStateChanged() {
super.drawableStateChanged();
if (ThemeUtils.isSkipAnimatedSelector()) {
Drawable drawable = CompoundButtonCompat.getButtonDrawable(this);
try {
if (ThemeUtils.getWrapperDrawable(drawable) instanceof AnimatedStateListDrawable) {
drawable.jumpToCurrentState();
}
} catch (NoClassDefFoundError error) {
error.printStackTrace();
}
}
}
代码示例来源:origin: facebook/litho
public void release(Drawable drawable, int resId) {
SimplePoolWithCount<Drawable> drawablesPool = mDrawableCache.get(resId);
if (drawablesPool == null) {
drawablesPool = new SimplePoolWithCount<>(DRAWABLES_POOL_MAX_ITEMS);
mDrawableCache.put(resId, drawablesPool);
}
// Reset a stateful drawable, and its animations, before being released.
if (drawable.isStateful()) {
drawable.setState(StateSet.WILD_CARD);
if (SDK_INT >= HONEYCOMB) {
drawable.jumpToCurrentState();
}
}
drawablesPool.release(drawable);
}
代码示例来源:origin: w446108264/ScrollableLayout
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (foreground != null) foreground.jumpToCurrentState();
}
代码示例来源:origin: NordicSemiconductor/Android-nRF-Toolbox
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (mForegroundSelector != null) mForegroundSelector.jumpToCurrentState();
}
代码示例来源:origin: ShawnLin013/NumberPicker
@CallSuper
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
if (mDividerDrawable != null) {
mDividerDrawable.jumpToCurrentState();
}
}
代码示例来源:origin: apptik/MultiSlider
@Override
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
for (Thumb thumb : mThumbs) {
if (thumb.getThumb() != null) thumb.getThumb().jumpToCurrentState();
}
}
内容来源于网络,如有侵权,请联系作者删除!