use of org.wikipedia.drawable.AppLevelListDrawable in project apps-android-wikipedia by wikimedia.
the class AudioUrlSpan method drawable.
@NonNull
private static Drawable drawable(Context context) {
LevelListDrawable levels = new AppLevelListDrawable();
levels.addLevel(PLAY_ICON_LEVEL, PLAY_ICON_LEVEL, spinnerDrawable(context));
levels.addLevel(STOP_ICON_LEVEL, STOP_ICON_LEVEL, speakerDrawable(context));
int radius = getDimensionPixelSize(context, R.dimen.audio_url_span_loading_spinner_radius);
levels.setBounds(0, 0, radius * 2, radius * 2);
return levels;
}
Aggregations