@@ -0,0 +1,2549 @@
+package org.stepic.droid.util;%0A%0Aimport android.content.Context;%0Aimport android.graphics.drawable.Drawable;%0Aimport android.os.Build;%0Aimport android.support.annotation.DrawableRes;%0A%0Aimport org.stepic.droid.R;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport javax.inject.Singleton;%0A%0A@Singleton%0Apublic class StepTypeResolver %7B%0A%0A    private Map%3CString, Drawable%3E mapFromTypeToDrawable;%0A    private Context mContext;%0A%0A    public StepTypeResolver(Context context) %7B%0A%0A        mapFromTypeToDrawable = new HashMap%3C%3E();%0A%0A%0A        mapFromTypeToDrawable.put(%22text%22, getDrawable(context, R.drawable.ic_theory));%0A        mapFromTypeToDrawable.put(%22video%22, getDrawable(context, R.drawable.ic_video));%0A        mapFromTypeToDrawable.put(%22matching%22, getDrawable(context, R.drawable.ic_matching));%0A        mapFromTypeToDrawable.put(%22sorting%22, getDrawable(context, R.drawable.ic_sorting));%0A        mapFromTypeToDrawable.put(%22match%22, getDrawable(context, R.drawable.ic_math));%0A        mapFromTypeToDrawable.put(%22free-answer%22, getDrawable(context, R.drawable.ic_free_answer));%0A        mapFromTypeToDrawable.put(%22table%22, getDrawable(context, R.drawable.ic_table));%0A        mapFromTypeToDrawable.put(%22string%22, getDrawable(context, R.drawable.ic_string));%0A        mapFromTypeToDrawable.put(%22choice%22, getDrawable(context, R.drawable.ic_choice));%0A        mapFromTypeToDrawable.put(%22number%22, getDrawable(context, R.drawable.ic_number));%0A        mapFromTypeToDrawable.put(%22dataset%22, getDrawable(context, R.drawable.ic_dataset));%0A        mapFromTypeToDrawable.put(%22animation%22, getDrawable(context, R.drawable.ic_animation));%0A        mapFromTypeToDrawable.put(%22chemical%22, getDrawable(context, R.drawable.ic_chemical));%0A        mapFromTypeToDrawable.put(%22fill-blanks%22, getDrawable(context, R.drawable.ic_fill_blanks));%0A        mapFromTypeToDrawable.put(%22puzzle%22, getDrawable(context, R.drawable.ic_puzzle));%0A        mapFromTypeToDrawable.put(%22pycharm%22, getDrawable(context, R.drawable.ic_pycharm));%0A%0A    %7D%0A%0A    public Drawable getDrawableForType(String type) %7B%0A        Drawable drawable = mapFromTypeToDrawable.get(type);%0A        if (drawable != null)%0A            return drawable;%0A        else%0A            return getDrawable(mContext, R.drawable.ic_theory);%0A    %7D%0A%0A    private Drawable getDrawable(Context context, @DrawableRes int drawableRes) %7B%0A        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.LOLLIPOP) %7B%0A            return context.getDrawable(drawableRes);%0A        %7D else %7B%0A            return context.getResources().getDrawable(drawableRes);%0A        %7D%0A    %7D%0A%0A%7D%0A

Add resolver for drawable item for step