Skip to content
Advertisement

Tag: android-drawable

How to change the background color of a View Drawable without changing its body in recyclerView?

I have a standard drawable with a body and a color. but I’m having trouble changing the color of this drawable in the Bind process of my recyclerView, whenever I invoke the method holder.item.setBackgroundColor (); or setBackground it even changes the color as needed, but it ends up totally changing the shape of my initial drawble. My shape Drawble: the

Android Vector Icon – Add a border

I’m wondering if it may be possible to add a white border to a Android Vector Icon (xml format). I’ve tried to overlap a bigger version of the icon itself, but the result it’s not as I was expecting (as you can see in the attached images). Is there a way to modify the xml to enlarge a bit the

Create a Bitmap/Drawable from file path

I’m trying to create a Bitmap or Drawable from existing file path. But setImageBitmap(), setImageDrawable() doesn’t show an image from the path. I’ve printed path with mText and it looks like : /storage/sdcard0/DCIM/100LGDSC/CAM00001.jpg What am i doing wrong? Anyone can help me? Answer Create bitmap from file path: If you want to scale the bitmap to the parent’s height and

Advertisement