android - LinearLayout Styling and XML file -
i want insert new line in layout. in first line have 4 simple textviews , on second line want have buttons .. searching throw internet got answer this:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" <linearlayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="fill_parent"> </linearlayout> </linearlayout>
but when im looking @ desinger im getting wigets on same line im wrong ?
please try this......
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <linearlayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent"> <textview android:text="text" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <textview android:text="text" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <textview android:text="text" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <textview android:text="text" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </linearlayout> <linearlayout android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="fill_parent"> <button android:text="text" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </linearlayout>
Comments
Post a Comment