Reputation: 139
I am using sliding panel foursquare library and as i open the panel activity i found panel to be expanded by default but i wan to set it to be collapse by default so please tell me how to do that?
As i slide down the panel or collapse it sliding layout get of 40 DP in height but i want it to be of 100 DP minimum.
So please tell me how and where to make changes to have these two things in my app?
what i have tried so far is that changed attributes these field in the sliding panel widget but none of them is working for me
collapseMap();
slidingUpPanelLayout.hidePane()
slidingUpPanelLayout.collapsePane();
app:paralaxOffset="@dimen/paralax_offset"
app:shadowHeight="0dp"
app:dragView="@+id/sliding_container"
app:panelHeight="40dp"
Upvotes: 2
Views: 3394
Reputation: 11082
You can set the default state from the layout xml file itself. Add the below attributes to the com.sothree.slidinguppanel.SlidingUpPanelLayout
app:umanoInitialState="collapsed"
For collapsed panel height
app:umanoPanelHeight="100dp"
Upvotes: 2
Reputation: 306
sliding panel foursquare library is actually implementing this library:https://github.com/umano/AndroidSlidingUpPanel
and i have used this AndroidSlidingUpPanel library and for this I used mSlideLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
So i hope this code will help you.
Upvotes: 3