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. XML RPC Parsing Error

This is one exemple whitch give me all time some error  . Also this
code is simular on the codeprojet.

I ast some help for to solve this problem. Problem of Firewall! or
other! I dont know


import java.util.Vector;


import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class xmlrpc extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        TextView tv;

        XMLRPCClient client = new XMLRPCClient("");
     // add 2 to 4
     try {
                int sum = (Integer)"add", 2, 4);

     // check whether x is inside range 4..10
     boolean isInside = (Boolean)"isInside", 6, 4, 10);
     // capitalize string
     String capitalized = (String)"capitalize", "to be or
not to be");
     tv= new TextView(this);

     } catch (XMLRPCException e) {
         tv= new TextView(this);




2. Native code is being called successfully but not executed properly

    I am newbie to Android ,Hence can you explain it in detail .

Thanks in Advance,


3. how to read sms from inbox

4. Empty list

5. local service lifecycle...

6. Video quality

7. Scaled down image + bottom buttons in dialog