android - Drawable Panel above toolbars -
i have activity containing - toolbar
, tabs
, viewpager
, floatingactionbutton
, draggablepanel
.
when initialize draggable panel, appears below toolbar
, floatingbutton
, tabs
. setting draggablepanel.bringtofront()
brings above viewpager
. how bring draggablepanel
above when initialized?
layout file:
<?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" xmlns:draggable_panel="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" tools:context="in.brewtv.activities.homeactivity"> <android.support.design.widget.appbarlayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingtop="@dimen/appbar_padding_top" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="30dp" android:background="?attr/colorprimary" app:popuptheme="@style/apptheme.popupoverlay"> </android.support.v7.widget.toolbar> <android.support.design.widget.tablayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" android:fillviewport="false" app:tabgravity="fill" app:tabmode="fixed" /> </android.support.design.widget.appbarlayout> <android.support.v4.view.viewpager android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <android.support.design.widget.floatingactionbutton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" app:srccompat="@drawable/change_mood" /> <!-- draggablepanel --> <com.github.pedrovgs.draggablepanel android:id="@+id/draggable_panel" android:layout_width="fill_parent" android:layout_height="fill_parent" draggable_panel:x_scale_factor="2.3" draggable_panel:y_scale_factor="2.3" draggable_panel:top_fragment_height="200dp" draggable_panel:top_fragment_margin_right="10dp" draggable_panel:top_fragment_margin_bottom="10dp" draggable_panel:enable_horizontal_alpha_effect="true"/> </android.support.design.widget.coordinatorlayout>
screen shots:
try set elevation, higher value fab draggablepanel
<com.github.pedrovgs.draggablepanel android:id="@+id/draggable_panel" android:layout_width="match_parent" android:layout_height="match_parent" android:elevation="10dp" draggable_panel:x_scale_factor="2.3" draggable_panel:y_scale_factor="2.3" draggable_panel:top_fragment_height="200dp" draggable_panel:top_fragment_margin_right="10dp" draggable_panel:top_fragment_margin_bottom="10dp" draggable_panel:enable_horizontal_alpha_effect="true"/>
Comments
Post a Comment