I have checked Stack Overflow questions & also check some other code books.
but i am not satisfied & not find out in similar questions.
I don't have any code but I have imaged this type of layout implementation. see attached image layout.
Please use below code for if you have shape XML
Drawable tempDrawable = getResources().getDrawable(R.drawable.library_cirecle);
LayerDrawable bubble = (LayerDrawable) tempDrawable; (cast to root element in xml)
GradientDrawable solidColor = (GradientDrawable) bubble.findDrawableByLayerId(R.id.outerRectangle);
solidColor.setColor(colorToPaint);
imageView.setImageDrawable(tempDrawable);
if u do not have code then make pdf or SWF file and import and make for shape in XML by using android editor