ImageView setMaxWidth - 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 setMaxWidth 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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related ImageView setMaxWidth Questions & Answers:

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