Reputation: 65
My FloatingActionButton show under my textviews and images(hide behind). i mean i can see it but instead of being over and float(the floating is ok) it is show behind.. this is my xml:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:hilitapplication="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<android.support.design.widget.FloatingActionButton
android:id="@+id/myFAB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
hilitapplication:borderWidth="0dp"
android:layout_margin="10dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:paddingBottom="10dp"
android:textSize="19sp"
hilitapplication:fontName="FredokaOne-Regular.ttf"
android:textColor="#992747"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text1"
android:textSize="17sp"
android:layout_marginBottom="10dp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
android:layout_marginBottom="10dp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text2"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text3"
android:textSize="17sp"
android:layout_marginBottom="10dp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text4"
android:paddingBottom="10dp"
android:textSize="19sp"
hilitapplication:fontName="FredokaOne-Regular.ttf"
android:textColor="#992747"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text5"
android:textSize="17sp"
android:layout_marginBottom="10dp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_register"
android:background="@null"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_login"
android:background="@null"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:paddingBottom="5dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fs"
android:background="@null"
android:layout_marginBottom="3dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_addgh"
android:background="@null"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_worker"
android:background="@null"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:paddingBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fsmenu"
android:background="@null"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fr01"
android:background="@null"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fr02"
android:background="@null"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fr03"
android:background="@null"
android:paddingBottom="5dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:paddingBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_q1"
android:background="@null"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_q2"
android:background="@null"
android:layout_marginBottom="10dp"
/>
</LinearLayout>
</ScrollView>
</RelativeLayout>
i can not understand why ... and off-course it is not clickable(even when its show between the texts or images..while scrolling..)
Upvotes: 1
Views: 83
Reputation: 3770
Update your xml as follows:-
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:hilitapplication="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:paddingBottom="10dp"
android:textSize="19sp"
hilitapplication:fontName="FredokaOne-Regular.ttf"
android:textColor="#992747"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text1"
android:textSize="17sp"
android:layout_marginBottom="10dp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
android:layout_marginBottom="10dp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text2"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text3"
android:textSize="17sp"
android:layout_marginBottom="10dp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text4"
android:paddingBottom="10dp"
android:textSize="19sp"
hilitapplication:fontName="FredokaOne-Regular.ttf"
android:textColor="#992747"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text5"
android:textSize="17sp"
android:layout_marginBottom="10dp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_register"
android:background="@null"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_login"
android:background="@null"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:paddingBottom="5dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fs"
android:background="@null"
android:layout_marginBottom="3dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_addgh"
android:background="@null"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_worker"
android:background="@null"
android:layout_marginBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:paddingBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fsmenu"
android:background="@null"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fr01"
android:background="@null"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fr02"
android:background="@null"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_fr03"
android:background="@null"
android:paddingBottom="5dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:paddingBottom="10dp"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
/>
<hilitsh.com.user.hilitapplication.MyTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="text"
android:textSize="17sp"
hilitapplication:fontName="raleway_medium.ttf"
android:layout_marginBottom="10dp"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_q1"
android:background="@null"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/info_q2"
android:background="@null"
android:layout_marginBottom="10dp"
/>
</LinearLayout>
</ScrollView>
<android.support.design.widget.FloatingActionButton
android:id="@+id/myFAB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
hilitapplication:borderWidth="0dp"
android:layout_margin="10dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
Upvotes: 1