ok ! setting the buttons' height and width to wrap-content, worked !, but it screwed something else in the application.
Is there a possibility that i have 5 linearlayouts in main.xml, and i start displaying with 3 linearlayouts and ad one by one after some time ? what woyld that code be ? linearlayout.setvisibility=invisible is not the solution because ll is invisible but it is aquiring screen space. i want that screen space free, so that the buttons are arranged perfectly regards Jagat On Nov 21, 4:43 pm, Jags <[email protected]> wrote: > I guess as my linearlayout's width is wrap_content, it will expand > when my button expands. width might not expand, because of the weight > = 1 factor > > On Nov 21, 4:38 pm, Jags <[email protected]> wrote: > > > thanks for replying, > > > i was wondering that too, i wrote a plain code, there it works. is my > > linearlayout restricting it ? > > > i have my layout defined as below > > > <LinearLayout android:id="@+id/LinearLayout01" > > android:layout_width="fill_parent" > > android:layout_height="wrap_content" > > android:layout_marginTop="40dip"> > > <Button android:id="@+id/Button01" > > android:layout_width="60px" > > android:layout_height="60px" > > android:background="@drawable/btnattr" > > android:scaleType="fitXY" > > android:layout_marginLeft="20dip" > > android:layout_marginTop="5dip" > > android:layout_weight="1"></Button> > > <Button android:id="@+id/Button02" > > android:layout_width="60px" > > android:layout_height="60px" > > android:background="@drawable/btnattr" > > android:scaleType="fitXY" > > android:layout_marginLeft="20dip" > > android:layout_marginTop="5dip" > > android:layout_weight="1"></Button> > > <Button android:id="@+id/Button03" > > android:layout_width="60px" > > android:layout_height="60px" > > android:background="@drawable/btnattr" > > android:scaleType="fitXY" > > android:layout_marginLeft="20dip" > > android:layout_marginTop="5dip" > > android:layout_weight="1"></Button> > > </LinearLayout> > > > On Nov 21, 4:34 pm, Nithin <[email protected]> wrote: > > > > Hi, > > > > I am using android 1.6. In that , its working fine, but setHeight() > > > and setWidth() are pretty straight forward, nothing complex in that. > > > You are creating button in code right ?. > > > > Thanks > > > > On Nov 21, 3:00 pm, Jags <[email protected]> wrote: > > > > > Hi all, > > > > > Can anybody please confirm, that button.setHeight and button.setWidth > > > > is not changing the height and width of buttons at the run time ? I am > > > > using android 1.5 > > > > > regards > > > > Jagat -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

