[android-developers] Re: Layout - Weight not working

2009-10-04 Thread Raphael
I'm no layout expert but instead I'd try: - android:layout_width="fill_parent" for both - android:layout_weight=0 for the first one - android:layout_weight=1 for the second one. R/ On Sun, Oct 4, 2009 at 10:21 AM, Mark Murphy wrote: > >> All I want is to make the first textview take as much spa

[android-developers] Re: Layout - Weight not working

2009-10-04 Thread Mark Murphy
> All I want is to make the first textview take as much space as needed > without wrapping and the second text view to wrap and display. I am > not able to do this simple thing with Linear Layout. Use android:layout_width="wrap_content" and no weight for the first TextView. Use android:layout_wid

[android-developers] Re: Layout - Weight not working

2009-10-04 Thread Siju Mathew
Hi Mark, I understand that I am doing something wrong. All I want is to make the first textview take as much space as needed without wrapping and the second text view to wrap and display. I am not able to do this simple thing with Linear Layout. I tried giving 0px for both adn tried different c

[android-developers] Re: Layout - Weight not working

2009-10-04 Thread Mark Murphy
> Layout is not dependant on the weight, it is a weird combination of > the text size and the weight. You are telling Android that you want to have each TextView take up as much space as its text requires (android:layout_width="wrap_content") and if that does not exactly fit the width, use the we

[android-developers] Re: Layout - Weight not working

2009-10-04 Thread Siju Mathew
Hi Mark, Thanks for your reply. Layout is not dependant on the weight, it is a weird combination of the text size and the weight. If I give a bigger text, the weight parameter does not have any use. Sorry for my words, I find it Stupid. But I am very weak in Layouts, I never could understand why

[android-developers] Re: Layout - Weight not working

2009-10-04 Thread Mark Murphy
> LinearLayout obeys weight and as per documentation weight gives > priority to an object. Here is the layout I have: > > Here you can see that the first textview has a weight of 2, second has > a weight of 0, but still the second text view takes up all the space. > If I give the first edit view a