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. Can I include Jar file build using SUN JDK in Android application

Hi,
I am new to Android.
I have a JAR file built using SUN JDK. I want to use it in my Android
application. I have added jar file in android application project as
mentioned in
http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary

But the application closes when I tried to run the application in
emulator. Exactly it take place when I tried to instantiate the class
in Jar file.

I want to know whether we can use these Jar files in Android
application.

Regards,
Kamal.

-- 

2. Building android contact source code (eclair version) on eclipse.

Hi all
     I am having the contact source code which i want to build on
eclipse & test on emulator,but the contact application uses some of
the hidden APIs of base code which is not present in default
android.jar because of that i am getting lot of error in my code.
    I am trying to generate my own android.jar using "Android sdk -
Including hidden APIs." option in android.mk of framework directory,
but still the hidden APIs not getting exposed in android.jar.

    Please tell how to customize the android.jar in order to make all
hidden APIs exposed to application.

Thanks in advance
Raghu

-- 

3. trackball selections on list view

4. How to pass a String from an activity to a service

5. do not work RECEIVE_BOOT_COMPLETED in emulator?

6. Developemtn on LG Ally?

7. Learning Porting