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. How to use "onTap" method to return to previous activity

I want to create a icon on google map while users click on this icon
can return to previous activity.
I have already searched some documents, I also know that I have to use
the "onTap" method but I still can't handle this problem. My question
is how to write the code to override the "onTap" method to call the
"setResult(RESULT_OK, intent)" method?

Could someone help me please!


2. Search function in Contact, Android 2.2

Hi guys:

     Here is a question, why Google do not support the sign search in
the Contact Module? I found that Google filter all the signs by a
static function called "lettersAndDigitsOnly(String name)" in the

    So my question is whether i can remove this limitation and open
this function? Is there any side-problems that will be occurred after
i modified.



3. Issue during compilation of Android for beagle board

4. Porting/Development of Simtool kit on Android

5. Preferences, Data Files, and SQL DBs when an application updates from the market?

6. Audio record from Bluetooth headset over froyo

7. How to sign Android app with system signature?