I'm not really sure if it's the thickness of the border or the margin around the image that needs to be changed. I have never worked with styles before, and just created a styles.xml and colors.xml file for the first time. I have changed the background color to Red, using the code below in image_border.xml. But I do not know how to change the border thickness around the images in HelloGallery.
Perhaps it's not in this file. But what exactly needs to be written in the code?
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:top="1dp" android:left="1dp"
android:right="1dp" android:bottom="1dp">
<shape android:shape="rectangle">
<solid android:color="@color/red" />
</shape>
</item>
</layer-list>
Edit: The answer might actually be a matter of modifying this portion of the code, since I was able to change the border color and image size here:
public View getView(int position, View convertView,
ViewGroup parent) {
ImageView i = new ImageView(mContext);
Bitmap bm = BitmapFactory.decodeFile(
FileList.get(position).toString());
i.setImageBitmap(bm);
i.setLayoutParams(new Gallery.LayoutParams(160, 180));
i.setScaleType(ImageView.ScaleType.FIT_XY);
i.setBackgroundResource(mGalleryItemBackground);
i.setBackgroundColor(Color.BLUE);
return i;
}