I have a custom imageview which i want to create a white border around. While doing some reasearche if get advice to create a code like this but i dont work, The imageview is a thumbnail image from a youtube video and showed in a listview.
mImage = new ImageView(mContext);
mImage.setLayoutParams(new LayoutParams(100, 100));
mImage.setVisibility(View.GONE);
mImage.setBackgroundColor(Color.WHITE);
mImage.setPadding(1, 1, 1, 1);
This is not the full part of the code, please tell if i need to post more. It doesnt make a 1dp/px padding around the picture. It makes like something about 20dp up and down and maybe 1 at left and right. I want it to create a small border around the image.