Android Sliding Up View

stanete picture stanete · Feb 18, 2014 · Viewed 14.7k times · Source

I need to do a Sliding Up View wich should slide up from the bottom of the screen when I click a button. It has to show on the bottom of the screen and I need to slide/drag it to the center of the screen. The images below explain it better. almost like the AndroidSlidingUpPanel from "umano" which you can find here:

The problem is that I want the first child (The content of my View - an image for example) to fill all the screen and also I want the second child(the actual bottom bar) to be showed when I click a button. The images below explain it better. If there is not possible to do this by changing the AndroidSlidingUpPanel, how can I do that? I have never worked with views like this. I would really appreciate any tip or help. Thank you very much.

enter image description here

Answer

arbuzz picture arbuzz · Jul 16, 2014

To hide or show panel, you can use

showPanel()

method.

To hide it try this:

SlidingUpPanelLayout slidingPanel = (SlidingUpPanelLayout) findViewById(R.id.sliding_panel); slidingPanel.hidePanel();

To make it appe

SlidingUpPanelLayout slidingPanel = (SlidingUpPanelLayout) findViewById(R.id.sliding_panel); slidingPanel.showPanel();

This is available only in v 2.0 of AndroidSlidingUpPanel (https://github.com/umano/AndroidSlidingUpPanel). As I know, it's included in android support library v13 now, but not sure if there is latest version.