ImageView setMaxHeight - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ImageView setMaxHeight method.

This code example shows how to use the following methods: setLayoutParams, setPadding, setImageDrawable, setMaxHeight, setMaxWidth
 
		/* First Icon and the Text to the right (horizontal), 
		 * not above and below (vertical) */ 
		this.setOrientation(HORIZONTAL);
 
		mIcon = new ImageView(context);
		mIcon.setPadding(5, 10, 20, 10); // 5px to the right
		mIcon.setScaleType(ImageView.ScaleType.FIT_CENTER);
        mIcon.setLayoutParams(new LayoutParams(90, 90)); 
		//mIcon.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); 
        mIcon.setMaxHeight(72);
        mIcon.setMaxWidth(72);
		mIcon.setImageDrawable(iconifiedTextSelected.getIcon());
//		// left, top, right, bottom 
 
		addView(mIcon);
		mText = new TextView(context);
		mText.setTypeface(Typeface.SERIF, 0);
		mText.setText(iconifiedTextSelected.getText());
		/* Now the text (after the icon) */ 
Full Snippet Info
7
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setAdjustViewBounds, setMaxHeight, setMaxWidth
	/* 
	 * Initiate class object and sets global parameters 
	 */ 
	public VideoThread(ImageView display) throws SocketException {
		receiver = new Receiver(8656);
		display.setAdjustViewBounds(true);
		display.setMaxHeight(320);
		display.setMaxWidth(480);
		this.display = display;
		flag = false;
	} 
	 
	/* 
	 * Stops video thread 
	 */ 
	public void stop() { 
		flag = false;
		if(receiver != null)
			receiver.close();
		receiver = null;
Full Snippet Info
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods: setBackgroundResource, setLayoutParams, setMinimumHeight, setOnClickListener, setOnTouchListener
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related ImageView setMaxHeight Questions & Answers:

setMaxHeight Method Overview
An optional argument to supply a maximum height for this view.
See Code Examples for other Android ImageView Methods: