change size of controls in a layout

by dillipk » Thu, 22 Apr 2010 03:32:36 GMT

Sponsored Links
  How do I change the size of the controls placed in a layout? (by any

 I tried to change the height of an EditBox ->setHeight(10); doesn't
seem to work.

Thank you,



change size of controls in a layout

by social hub » Thu, 22 Apr 2010 03:46:09 GMT

 did u call requestLayout()
or invalidate()

if that doesnt work try below
textView.getLayoutParams().height = x;
should work


Sponsored Links

change size of controls in a layout

by karteek » Thu, 22 Apr 2010 12:22:01 GMT

 If you declared EditText in xml file you can change by
<EditText android:layout_width="50px"
  where you can use any nuber instead of 50


change size of controls in a layout

by ~ TreKing » Thu, 22 Apr 2010 21:58:49 GMT


You should use "dp" to stay consistent across devices with different
resolutions, unless this is definitely what you want.

TreKing - Chicago transit tracking app for Android-powered devices 


Other Threads

1. Live Wallpaper Icon

I've made a Live Wallpaper, and included a full set of icons for it.
The icon isn't used in the Live Wallpaper menu, but is used for the
Configure action in the menu after you've added the Live Wallpaper.
What do I need to do to get icon to be used for my Live Wallpaper in the
"selection" menu for Live Wallpaper?


2. which is the best way to play encrpted song instantly?

Don't encrypt the file.

On Tue, Apr 19, 2011 at 12:32 AM, Hitendrasinh Gohil

Mark Murphy (a Commons Guy) | |

Android 3.0 Programming Books:


3. How to produce a closed source library ?

4. Fragment, how to send message from one fragment to another

5. Set Android WIFI Ip address from my own application

6. update xperiax10 ke froyo

7. hi, help a newbie :)