android.graphics.drawable.Drawable.inflate()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(228)

本文整理了Java中android.graphics.drawable.Drawable.inflate()方法的一些代码示例,展示了Drawable.inflate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.inflate()方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:inflate

Drawable.inflate介绍

暂无

代码示例

代码示例来源:origin: ZieIony/Carbon

@Override
  public void inflate(Drawable drawable, Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException {
    drawable.inflate(r, parser, attrs, theme);
  }
}

代码示例来源:origin: ZieIony/Carbon

@Override
  public void inflate(Drawable drawable, Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException {
    drawable.inflate(r, parser, attrs, theme);
  }
}

代码示例来源:origin: ZieIony/Carbon

@Override
  public void inflate(Drawable drawable, Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException {
    if (drawable instanceof LollipopDrawable) {
      ((LollipopDrawable) drawable).inflate(r, parser, attrs, theme);
      return;
    }
    drawable.inflate(r, parser, attrs);
  }
}

代码示例来源:origin: ZieIony/Carbon

@Override
  public void inflate(Drawable drawable, Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException {
    if (drawable instanceof LollipopDrawable) {
      ((LollipopDrawable) drawable).inflate(r, parser, attrs, theme);
      return;
    }
    drawable.inflate(r, parser, attrs);
  }
}

代码示例来源:origin: com.madgag/lazy-drawables

public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs)
    throws XmlPullParserException, IOException {
  mCurrDrawable.inflate(r, parser, attrs);
}

代码示例来源:origin: com.albedinsky.android/ui-graphics-base

/**
 */
@Override
@SuppressLint("NewApi")
public void inflate(@NonNull Resources resources, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException {
  if (UiConfig.MATERIALIZED) mDrawable.inflate(resources, parser, attrs, theme);
}

代码示例来源:origin: com.albedinsky.android/ui-graphics

/**
 */
@Override
public void inflate(@NonNull Resources resources, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs) throws XmlPullParserException, IOException {
  mDrawable.inflate(resources, parser, attrs);
}

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
public void inflate(@NonNull Resources resources, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs) throws XmlPullParserException, IOException {
  mDrawable.inflate(resources, parser, attrs);
}

代码示例来源:origin: com.albedinsky.android/ui-graphics-base

/**
 */
@Override
public void inflate(@NonNull Resources resources, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs) throws XmlPullParserException, IOException {
  mDrawable.inflate(resources, parser, attrs);
}

代码示例来源:origin: com.albedinsky.android/ui

/**
 */
@Override
@SuppressLint("NewApi")
public void inflate(@NonNull Resources resources, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException {
  if (UiConfig.MATERIALIZED) mDrawable.inflate(resources, parser, attrs, theme);
}

代码示例来源:origin: com.albedinsky.android/ui-graphics

/**
 */
@Override
@SuppressLint("NewApi")
public void inflate(@NonNull Resources resources, @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException {
  if (UiConfig.MATERIALIZED) mDrawable.inflate(resources, parser, attrs, theme);
}

代码示例来源:origin: AlexMofer/ProjectX

@Override
public void inflate(Resources resources, XmlPullParser parser, AttributeSet attrs,
          Resources.Theme theme)
    throws XmlPullParserException, IOException {
  super.inflate(resources, parser, attrs, theme);
  final TypedArray custom = DrawableHelper.obtainAttributes(resources, theme, attrs,
      R.styleable.AnimationDrawable);
  if (custom.hasValue(R.styleable.AnimationDrawable_android_repeatMode))
    mRepeatMode = custom.getInt(R.styleable.AnimationDrawable_android_repeatMode, RESTART);
  if (custom.hasValue(R.styleable.AnimationDrawable_android_repeatCount))
    mRepeatCount = custom.getInt(R.styleable.AnimationDrawable_android_repeatCount,
        INFINITE);
  if (custom.hasValue(R.styleable.AnimationDrawable_android_duration))
    mDuration = custom.getInteger(R.styleable.AnimationDrawable_android_duration,
        DEFAULT_DURATION);
  if (custom.hasValue(R.styleable.AnimationDrawable_android_autoStart))
    mAutoStart = custom.getBoolean(R.styleable.AnimationDrawable_android_autoStart,
        false);
  custom.recycle();
}

代码示例来源:origin: AlexMofer/ProjectX

@Override
public void inflate(Resources resources, XmlPullParser parser, AttributeSet attrs,
          Resources.Theme theme)
    throws XmlPullParserException, IOException {
  super.inflate(resources, parser, attrs, theme);
  final TypedArray custom = DrawableHelper.obtainAttributes(resources, theme, attrs,
      R.styleable.DrawableWrapper);
  final Drawable drawable = custom.getDrawable(R.styleable.DrawableWrapper_android_drawable);
  custom.recycle();
  if (drawable != null) {
    mDrawable = drawable;
    drawable.setCallback(this);
  }
}

代码示例来源:origin: AlexMofer/ProjectX

@Override
public void inflate(Resources resources, XmlPullParser parser, AttributeSet attrs,
          Resources.Theme theme)
    throws XmlPullParserException, IOException {
  super.inflate(resources, parser, attrs, theme);
  final TypedArray custom = DrawableHelper.obtainAttributes(resources, theme, attrs,
      R.styleable.LineDrawable);
  final ColorStateList backgroundColor =
      custom.getColorStateList(R.styleable.LineDrawable_android_background);
  final ColorStateList lineColor =
      custom.getColorStateList(R.styleable.LineDrawable_android_color);
  mLineSize = custom.getDimension(R.styleable.LineDrawable_android_width, 0);
  mGravity = custom.getInt(R.styleable.LineDrawable_android_gravity, Gravity.NO_GRAVITY);
  custom.recycle();
  if (backgroundColor != null)
    mBackgroundColor = backgroundColor;
  if (lineColor != null)
    mLineColor = lineColor;
}

代码示例来源:origin: AlexMofer/ProjectX

Resources.Theme theme)
  throws XmlPullParserException, IOException {
super.inflate(resources, parser, attrs, theme);
final TypedArray custom = DrawableHelper.obtainAttributes(resources, theme, attrs,
    R.styleable.FrameDrawable);

代码示例来源:origin: AlexMofer/ProjectX

Resources.Theme theme)
  throws XmlPullParserException, IOException {
super.inflate(resources, parser, attrs, theme);
final TypedArray custom = DrawableHelper.obtainAttributes(resources, theme, attrs,
    R.styleable.CornerDrawable);

代码示例来源:origin: AlexMofer/ProjectX

Resources.Theme theme)
  throws XmlPullParserException, IOException {
super.inflate(resources, parser, attrs, theme);
final float density = resources.getDisplayMetrics().density;
final TypedArray custom = DrawableHelper.obtainAttributes(resources, theme, attrs,

代码示例来源:origin: AlexMofer/ProjectX

Resources.Theme theme)
  throws XmlPullParserException, IOException {
super.inflate(resources, parser, attrs, theme);
final TypedArray custom = DrawableHelper.obtainAttributes(resources, theme, attrs,
    R.styleable.PathDrawable);

相关文章