<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.darshanbshah.odsystem.HoursFragment" android:id="@+id/frame_layout"> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content"> <CheckBox android:text="1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/hour1" android:layout_weight="1" /> <CheckBox android:text="2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/hour2" android:layout_weight="1" /> <CheckBox android:text="3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/hour3" android:layout_weight="1" /> <CheckBox android:text="4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/hour4" android:layout_weight="1" /> <CheckBox android:text="5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/hour5" android:layout_weight="1" /> <CheckBox android:text="6" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/hour6" android:layout_weight="1" /> </LinearLayout> </FrameLayout>