change size of controls in a layout

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


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

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

Thank you,

-DK

--



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;
requestLayout();
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"
          android:layout_height="50px">
</EditText>
  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
 http://sites.google.com/site/rezmobileapps/treking 

--



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

package org.me.xmlrpc.org;

import java.util.Vector;

import org.me.xmlrpc.R;
import org.xmlrpc.android.XMLRPCClient;
import org.xmlrpc.android.XMLRPCException;

import android.app.Activity;
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. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);
        TextView tv;

        XMLRPCClient client = new XMLRPCClient("http://foo.bar.com");
     // add 2 to 4
     try {
                int sum = (Integer) client.call("add", 2, 4);

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

     } catch (XMLRPCException e) {
         tv= new TextView(this);
                 tv.setText("----------------Error-------------"+e.toString());
                 setContentView(tv);

        }

    }


--~--~---------~--~----~------------~-------~--~----~

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

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


Thanks in Advance,
-Siva.





--~--~---------~--~----~------------~-------~--~----~

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