Question regarding linearlayout

by striverwang » Thu, 12 Mar 2009 01:24:31 GMT


Sponsored Links
 hi,all:
I have a question regarding linearlayout(maybe other layout types)
______________________
|       textf             |button  |
|_______________|______|

I want to implement above layout, firstly to place a textfield on the
screen, and place a button on its right, the button's size is fixed,
and I want to textfield to fill the rest space of the row.

I want to use LinearLayout, but can not implement such UI.

Anyboday have suggestion? Thank you!



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



Question regarding linearlayout

by Romain Guy » Thu, 12 Mar 2009 01:28:05 GMT


 Give your button a width of wrap_content, your text field a width of
0dip and a weight of 1.






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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


Sponsored Links


Question regarding linearlayout

by Dat Nguyen » Fri, 13 Mar 2009 01:47:13 GMT


 Why not trying RelativeLayout?You may use android:layout_toRightOf:
@id/textf  for the button.

Dat Nguyen.





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



Other Threads

1. usb device absent from adb after Ubuntu Karmic upgrade


> proposed here (

2. Problem installing Android 2.0 on Mac (Snow Leopard)

I had a similar problem. The fix was to start from scratch using the
2.0 base download then use it to download the required API levels.

Al.
--

* Looking for Android Apps? - Try http://andappstore.com/ *

======
Funky Android Limited is registered in England & Wales with the
company number  6741909.

The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.




-- 

3. cyanogen 4.2.3.1

4. Sometimes the running emulator is not found from within Eclipse?!

5. A note on "scamming the market"

6. Does android have a numeric keypad?

7. Droid Explorer