how to increase height & width while using ImageView xml

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

how to increase height & width while using ImageView xml

Postby pranav09 » Mon Jan 19, 2009 12:11 pm

i want to increase height and width of one image which contain height = 480 and width = 320.
Now, i want that image in height = 431 and width = 320. How it is possible?
User avatar
pranav09
Senior Developer
Senior Developer
 
Posts: 128
Joined: Mon Jan 19, 2009 12:01 pm
Location: Ahmedabad, India

Top

Postby tannerresearch » Mon Jan 19, 2009 6:49 pm

Create an ImageView object and fetch the imageview in the xml by id:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. ImageView thisimage = (ImageView) findViewById(R.id.thisid)
Parsed in 0.029 seconds, using GeSHi 1.0.8.4

and from there check out setMaxHeight, setMaxWidth, setMinimumHeight, setMinimumWidth, and see if any of those will suit your needs.
And of course, don't forget to add the ImageView back into it's parent layout:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. layout.addView(thisimage);
Parsed in 0.030 seconds, using GeSHi 1.0.8.4

Hope that helps!

http://www.androidjavadoc.com/1.0_r1_src/index.html
User avatar
tannerresearch
Junior Developer
Junior Developer
 
Posts: 21
Joined: Wed Jan 07, 2009 6:43 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests