I have the following layout structure:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/wrapper_layout"
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:background="@color/colorPrimary"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.phoenetoaster.doitcalendar.MainActivity">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<EditText
android:id="@+id/editText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginTop="105dp"
android:hint="@string/event_name"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="@style/textviews"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/when"/>
<TextView
android:id="@+id/value_when"
style="@style/textviewsChangingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/today"/>
</RelativeLayout>
<!--Seekbar 2 -->
<SeekBar
android:id="@+id/seekBar_when"
style="@style/seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="@style/textviews"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/time"/>
<TextView
android:id="@+id/value_time"
style="@style/textviewsChangingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/today"/>
</RelativeLayout>
<SeekBar
android:id="@+id/seekBar_time"
style="@style/seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/button"
style="@style/buttons"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/create_event_in_calendar"/>
</LinearLayout>
</RelativeLayout>
Which produces something like this:
I would like to ask how can i catch click outside of the form to hide the app to background?
I tried to set OnClick event to wrapper layout (Parent relative Layout) but this layout is not spread to whole height and width of the screen.
Should I add some other layouts?
How can I solve it please?
Many thanks for any advice