Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag to dynamically resize a pair of adjacent layouts on Android

I have a pair of adjacent views in an Android application. I'd like to give the user the ability to drag a widget to change the relative size of the two views within a larger container. If SlidingDrawer let the user pin the drawer wherever they wanted, that'd likely get me what I want.

My Google 'fu is failing me. I can't find a single example of this anywhere.

Thanks!

like image 851
Jesse Avatar asked Feb 21 '11 22:02

Jesse


1 Answers

I ended up putting together a bit of code to create a custom LinearLayout subclass to do what I wanted.

The code is at https://github.com/k9mail/splitview

like image 122
Jesse Avatar answered Oct 04 '22 08:10

Jesse