Skip to content

Instantly share code, notes, and snippets.

@igordeoliveirasa
Created February 20, 2015 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igordeoliveirasa/27d61a95bf0c610e799a to your computer and use it in GitHub Desktop.
Save igordeoliveirasa/27d61a95bf0c610e799a to your computer and use it in GitHub Desktop.
Image View Programmatically
ImageView imageView = new ImageView(context);
LinearLayout.LayoutParams imageViewLayoutParams = new LinearLayout.LayoutParams(56,56);
imageViewLayoutParams.setMargins(context.getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin), 0, 0, 0);
imageView.setLayoutParams(imageViewLayoutParams);
imageView.setTag(photo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment