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. Web service calling from andriod

Hi all,

i want to call a web service call, for that i used ksoap(j2me).when i
do a service call i am getting the folliwing exception
java.lang.NoClassDefFoundError: javax/microedition/io/Connector

Please help me solve this issue

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

2. Cant get Latitude and Longitude without Internet Connection

Hi all,

I am having problem in getting the latitude and longitude on my
phone..

Case:
i created an application that only display the "Toast" that display
the latitude and longitude once i
request it to. using the LocationManager.NETWORK_PROVIDER, instead of
gps.

And when I try it on my G1, everything was fine when i am connected to
the internet.
but when i disconnect G1 from WiFi, the application cant get the
latitude and longitude anymore..
 The onLocationChanged() is not
triggered anymore, instead, onStatusChanged() is triggered.. And I get
TEMPORARILY_UNAVAILABLE error..

So what i want to ask is :Is internet connection required to retrieve
the coordinate ONLY?

Note that I dont use any maps or visual representation of my location.
All I do was to get the latitude and longitude.

Or do i need to add any extra stuff?

As for the permission these are the ones I used, even though I doubt
that the INTERNET permission is needed..

android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.INTERNET

Anyone has any thought? Thanks

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

3. Asynchronous ListView

4. debug application - gdb

5. Projection Question

6. Notepad Example 1 Trouble

7. Could someone tell me what differences between 1.5 cupcake and 2.0 donut?