@@ -0,0 +1,1745 @@
+package com.nestedworld.nestedworld.helpers.drawable;%0A%0Aimport android.content.Context;%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.drawable.BitmapDrawable;%0Aimport android.graphics.drawable.Drawable;%0Aimport android.support.annotation.NonNull;%0Aimport android.view.LayoutInflater;%0Aimport android.view.View;%0Aimport android.widget.TextView;%0A%0Aimport com.nestedworld.nestedworld.R;%0A%0Apublic final class DrawableHelper %7B%0A%0A%0A    private DrawableHelper() %7B%0A        //Private constructor for avoiding this class to be construct%0A    %7D%0A%0A    public static Drawable buildCounterDrawable(@NonNull final Context context, final int count, final int backgroundImageId) %7B%0A        LayoutInflater inflater = LayoutInflater.from(context);%0A        View view = inflater.inflate(R.layout.menuitem_counter_layout, null);%0A        view.setBackgroundResource(backgroundImageId);%0A%0A        if (count == 0) %7B%0A            View counterTextPanel = view.findViewById(R.id.counterValuePanel);%0A            counterTextPanel.setVisibility(View.GONE);%0A        %7D else %7B%0A            TextView textView = (TextView) view.findViewById(R.id.count);%0A            textView.setText(String.valueOf(count));%0A        %7D%0A%0A        view.measure(%0A                View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),%0A                View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));%0A        view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());%0A%0A        view.setDrawingCacheEnabled(true);%0A        view.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);%0A        Bitmap bitmap = Bitmap.createBitmap(view.getDrawingCache());%0A        view.setDrawingCacheEnabled(false);%0A%0A        return new BitmapDrawable(context.getResources(), bitmap);%0A    %7D%0A%7D%0A

add DrawableHelper