app/src/main/res/layout/fragment_events.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
android:id="@+id/events_fragment_id"
tools:context=".event.nearbyEvents.EventsFragment">
<androidx.appcompat.widget.Toolbar
android:id="@+id/events_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/Theme.ConnectOut.AppBarOverlay">
<Button
android:id="@+id/events_filter_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginEnd="@dimen/fab_margin"
android:text="@string/filter"
android:background="@color/white"
android:textColor="@color/white"
android:textSize="15sp" />
</androidx.appcompat.widget.Toolbar>
<RadioGroup
android:id="@+id/events_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/events_toolbar"
android:layout_centerHorizontal="true"
android:padding="@dimen/fab_margin"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/map_switch_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:text="@string/map"
android:checked="true"
android:textAlignment="center"
android:textSize="20sp"
android:button="@android:color/transparent"
android:background="@drawable/radio_button_left_selector"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatRadioButton
android:id="@+id/list_switch_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:text="@string/list"
android:textAlignment="center"
android:checked="false"
android:textSize="20sp"
android:button="@android:color/transparent"
android:layout_weight="1"
android:background="@drawable/radio_button_right_selector" />
</RadioGroup>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/events_view_container"
android:layout_below="@+id/events_switch"
android:layout_above="@+id/events_list_add_button"
android:layout_margin="@dimen/fab_margin">
<FrameLayout
android:id="@+id/nearby_events_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/events_map_add_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/add_image"
android:background="?attr/colorPrimary"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_margin="10dp"
android:layout_above="@+id/nearby_events_container"
android:minWidth="50dp"
android:minHeight="50dp" />
</RelativeLayout>
<Button
android:id="@+id/events_list_add_button"
android:layout_width="wrap_content"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="@string/add_event"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/fab_margin"
android:layout_marginEnd="@dimen/fab_margin" />
</RelativeLayout>