Create an Image View programmatically
// ImageView Setup
LinearLayoutCompat.LayoutParams imageLayoutParams =
new LinearLayoutCompat.LayoutParams(40, 40);
imageLayoutParams.setMargins(0, 0, 4, 0);
String imageUrl = imageUrlList.get(i);
ImageView imageView = new ImageView(mContext);
imageView.setLayoutParams(imageLayoutParams);
ImageHelper.loadSmallImage(imageUrl, imageView);
//adding view to layout
linearLayout.addView(imageView);