Best code examples for ImageView setMaxHeight method (android.widget.ImageView.setMaxHeight)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ImageView setMaxHeight method.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

ImageView setMaxHeight examples from Open Source projects
This code example shows how to use the following methods: setImageDrawable, setMaxHeight, setMaxWidth, setScaleType, setLayoutParams
26:	mIcon = new ImageView(context); 
27:	mIcon.setPadding(5, 10, 20, 10); // 5px to the right 
28:	mIcon.setScaleType(ImageView.ScaleType.FIT_CENTER); 
29:	mIcon.setLayoutParams(new LayoutParams(90, 90)); 
31:	mIcon.setMaxHeight(72); 
32:	mIcon.setMaxWidth(72); 
33:	mIcon.setImageDrawable(iconifiedTextSelected.getIcon()); 
Full Snippet Info
This code example shows how to use the following methods: setAdjustViewBounds, setMaxHeight, setMaxWidth
25:	display.setAdjustViewBounds(true); 
26:	display.setMaxHeight(320); 
27:	display.setMaxWidth(480); 
Full Snippet Info
This code example shows how to use the following methods: setImageBitmap, setMaxHeight, setBackgroundResource, setLayoutParams, setMinimumHeight
91:	btn = new ImageButton(context); 
92:	btn.setMaxHeight(preferedHeight); 
93:	btn.setMinimumHeight(preferedHeight); 
94:	btn.setPadding(0, 0, 0, 0); 
96:	btn.setLayoutParams(btnlp); 
105:	btn.setBackgroundResource(transparentResourceID); 
106:	btn.setImageBitmap(icon); 
129:	btn.setOnClickListener(new OnClickListener() { 
158:	btn.setOnTouchListener(new OnTouchListener() { 
Full Snippet Info
Related ImageView setMaxHeight Questions & Answers:
Displays an arbitrary image, such as an icon. The ImageView class can load images from various sources (such as resources or content providers), takes care of computing its measurement from the image so that it can be used in any layout manager, and pr...
setMaxHeight Method Overview
An optional argument to supply a maximum height for this view.
See Also
  • getDrawable
    Return the view's drawable, or null if no drawable has been assigned.
  • setAdjustViewBounds
    Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
  • setAlpha
    This method was deprecated in API level 16. use #setImageAlpha(int) instead
  • setImageURI
    Sets the content of this ImageView to the specified Uri.
  • setMaxWidth
    An optional argument to supply a maximum width for this view.
  • setScaleType
    Controls how the image should be resized or moved to match the size of this ImageView.