I want to slide-in/Slide-out my View from top over the another view. When the top view slide in, the first visible view become fade and if user click outside the top view, it will slide-out again using bottom-to-top animation and first view become completely visible again. For example, you can check the line chat layout, in which user can check the different option by clicking on the top right button in action bar and button become visible over the chat screen.
Asked
Active
Viewed 2,677 times
1
-
do you want `NavigationDrawer` kind of thing ? – Spring Breaker May 14 '15 at 07:21
-
Upto some extent, but it pulls down from top. – Zeeshan Ahmed May 14 '15 at 07:28
-
I guess you want a [Depth Page Transformer](http://developer.android.com/training/animation/screen-slide.html) – Prince May 14 '15 at 07:33
-
Take a look at https://github.com/Ali-Rezaei/SlidingDrawer which makes it possible to slide from any side by few lines of code. – Ali Jun 13 '15 at 19:35
1 Answers
2
This is what you need:
https://github.com/wunderlist/android-sliding-layer-lib
<com.wunderlist.slidinglayer.SlidingLayer
xmlns:slidingLayer="http://schemas.android.com/apk/res-auto"
android:id="@+id/slidingLayer1"
android:layout_width="@dimen/layer_width"
android:layout_height="@dimen/layer_height"
slidingLayer:shadowDrawable="@drawable/sidebar_shadow"
slidingLayer:shadowSize="@dimen/shadow_size"
slidingLayer:offsetDistance="@dimen/offset_distance"
slidingLayer:previewOffsetDistance="@dimen/preview_offset_distance"
slidingLayer:stickTo="top|bottom|right|left"
slidingLayer:changeStateOnTap="true">
</com.wunderlist.slidinglayer.SlidingLayer>
You can change the sliding pattern/direction here.
Install this app before you proceed with its integration: https://play.google.com/store/apps/details?id=com.slidinglayersample&hl=en

Shishir Shetty
- 2,021
- 3
- 20
- 35
-
yes i need the same thing, But i want to close it when user click outside the uper layout. got my point? – Zeeshan Ahmed May 14 '15 at 07:35
-
call the dismiss-layer method, when user clicks outside the upper layout. got my point? – Shishir Shetty May 14 '15 at 10:09