Search in sources :

Example 1 with AppLevelListDrawable

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;
}
Also used : AppLevelListDrawable(org.wikipedia.drawable.AppLevelListDrawable) LevelListDrawable(android.graphics.drawable.LevelListDrawable) AppLevelListDrawable(org.wikipedia.drawable.AppLevelListDrawable) NonNull(android.support.annotation.NonNull)

Aggregations

LevelListDrawable (android.graphics.drawable.LevelListDrawable)1 NonNull (android.support.annotation.NonNull)1 AppLevelListDrawable (org.wikipedia.drawable.AppLevelListDrawable)1