I am using nested linearlayout in my xml file.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
>
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:text="left"
android:layout_weight="1"
android:layout_gravity="left"
android:id="@+id/previous"></Button>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:id="@+id/date"
android:textColor="#505050"
/>
<Button android:text="right"
android:layout_weight="1"
android:layout_gravity="right"
android:id="@+id/next"></Button>
</LinearLayout>
.........
........
</LinearLayout>
My application doesnt start , i get an error message saying the process stopped unexpectedly. Though it works without the inner Linearlayout.
Any ideas why?
Thanks
You should definitely post the stack trace when you have exceptions thrown and you want help, but in this case you seem to be missing the
layout_widthandlayout_heightattributes for your buttons.