taltstidl / AndroidSlidingUpPanel

This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.
http://umano.me
Apache License 2.0
13 stars 6 forks source link

Fab positioning #22

Closed pengrad closed 8 years ago

pengrad commented 8 years ago

Hi, thanks for nice library! Can you please help me to build this layout. In Expanded state fab should be here: screen shot 2016-01-27 at 12 39 33 And in the collapsed state here screen shot 2016-01-27 at 12 39 41

Thanks!

taltstidl commented 8 years ago

@pengrad As far as I know this should simply be copy and paste of the layout in the Readme, with the umanoFabMode set to leave_behind. Or did you encounter any issues doing that?

pengrad commented 8 years ago

Yes, it works perfect until I resize panel. Then I found wrong fab position in collapsed state. Anyway thanks for quick response, I decided to self positioning with CoordinatorLayout.

taltstidl commented 8 years ago

@pengrad How did you resize panel? I'm still interested in resolving this.

pengrad commented 8 years ago

I have header (second child in SlidingPanel) as

<FrameLayout
            android:id="@+id/slide_header"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="0.5"/>

and resize it with

slideHeader.setLayoutParams(new SlidingUpPanelLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, 0.7f));
taltstidl commented 8 years ago

@pengrad Well, there's nothing I could do about that, you'd just have to call requestLayout() on the FloatingActionButtonLayout after this change.