Today, I implemented next functionality of the app. I designed the layout for Enter tables activity. Here’s how it looks like.

Code for this layout is given below.
activity_enter_tables:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.reservation.restaurant.Activities.EnterTablesActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<include layout="@layout/toolbar"/>
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_enter_tables" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabViewTable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
app:fabSize="normal"
app:backgroundTint="@color/colorPrimary"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@drawable/list" />
</android.support.design.widget.CoordinatorLayout>
content_enter_tables.xml:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.reservation.restaurant.Activities.EnterTablesActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:orientation="vertical"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:id="@+id/llCreateTable"
android:layout_marginBottom="50dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:padding="16dp"
android:background="@drawable/add_tables_dialog_border"
android:layout_height="wrap_content">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textStyle="bold"
android:text="Create a new Table entry"
android:textSize="20sp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="10dp"
android:background="@color/toggleBackground"
/>
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/chooseCategory"
android:layout_marginTop="15dp"></Spinner>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginTop="10dp"
android:text="Enter Table Name"/>
<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:id="@+id/tableName"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginTop="10dp"
android:text="Enter number of Chairs"/>
<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:id="@+id/numChairs"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:weightSum="1">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="Status Active"
android:layout_gravity="center_vertical"
android:layout_weight="0.8"/>
<com.suke.widget.SwitchButton
android:id="@+id/switch_btn_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.2"
app:sb_shadow_color="@color/toggleBackground"
app:sb_checked_color="@color/colorPrimary"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp"
android:weightSum="1">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="Is this table mergeable?"
android:layout_weight="0.8"/>
<com.suke.widget.SwitchButton
android:id="@+id/switch_btn_mergeable"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
app:sb_shadow_color="@color/toggleBackground"
app:sb_checked_color="@color/colorPrimary"
android:layout_weight="0.2"
/>
</LinearLayout>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/btn_check_availability"
android:layout_marginTop="20dp"
android:textSize="16sp"
android:textColor="@drawable/btn_text_color"
android:text="Create Table"
android:id="@+id/btn_create_table"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</FrameLayout>


