I have a problem. I used this library to create a sliding panel. Click here . I added it, and then I tried to do a floating action, as in the google map application (as in the picture).

But here is below my result. How to install (make the top of the trasprent sliding panel can be) correctly, as in the 1st image.

fragment_1.xml (Mark part of the sliding layout)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.sothree.slidinguppanel.SlidingUpPanelLayout
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoPanelHeight="56dp"
sothree:umanoShadowHeight="4dp"
sothree:umanoParalaxOffset="50dp"
sothree:umanoDragView="@+id/dragView"
xmlns:fab="http://schemas.android.com/apk/res-auto">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="100">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="390dp"
android:background="@android:color/transparent"
android:orientation="vertical"
android:clickable="true"
android:focusable="false"
sothree:umanoOverlay="true"
android:layout_below="@+id/main_content">
<!-—TOP OF PANEL -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:orientation="horizontal"
android:background="#03A9F4"
android:id="@+id/dragView">
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="14sp"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:textColor="@android:color/white"/>
<Button
android:id="@+id/follow"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textSize="14sp"
android:gravity="center_vertical|right"
android:paddingRight="10dp"
android:paddingLeft="10dp"/>
<com.melnykov.fab.FloatingActionButton
android:id="@+id/fab"
sothree:fab_type="normal"
android:layout_marginBottom="25dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right|center"
android:tint="@android:color/white"
android:src="@android:drawable/ic_dialog_map"
fab:fab_colorNormal="@color/fab_primary"
fab:fab_colorPressed="@color/fab_pressed"
fab:fab_colorRipple="@color/fab_ripple"/>
</LinearLayout>
</LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</RelativeLayout>
Thanks for any help!
source
share