blipinsk / FlippableStackView

An Android library introducing a stack of Views with the first item being flippable.
Apache License 2.0
810 stars 150 forks source link

Changing Stack anchoring #3

Open vijayrawatsan opened 9 years ago

vijayrawatsan commented 9 years ago

Horizontal gravity only allows for swiping the views to right. I would like to swiping view to left. Basically how to change the anchoring?

joeljos commented 9 years ago

Thank you for the wonderful library. I find it very useful in the UI pages.

I would like to know this too. I have made orientation as horizontal, but the default is swipe from left-to-right.

a) I wanted to modify so that the swipe can be from right-to-left. b) Also the layout which is stacked facing the left-to-right, i need it to be from right-to-left.

Could you kindly let me know how these two can be done?. I tried following the code, but i think its hardwired into the OrientedViewPager?. Any help on this would be much appreciated!.

Thanks, Joel.

blipinsk commented 9 years ago

Hi Joel! First of all thanks for the kind words, they are much appreciated.

I originally wanted to include anchoring to both sides of the stack view (top and bottom for the vertical stack, and left and right for the horizontal one) in the update that was introducing orientation. Unfortunatelly I reliased that the thing was not trivial enough for me to include it in the somehow "quick-and-easy-in-between-coffees-update" that I was doing. It still holds one of the top spots on my to-do list, but currently I'm terribly, terribly short on time. For now I can at least share what I come up with, when I was thinking about it (although bare in mind that I might be wrong on my conclusions :stuck_out_tongue:, so dont stick to them at all costs).

First of all, I think you can accomplish that without touching OrientedViewPager (I wanna avoid messing with it since it's just an original android's ViewPager with changing orientation capabilities, nothing more). I think you need to first turn on the reverseDrawingOrder in the setPageTransformer method. And modify StackPageTransformer in a way that can show Stack being anchored on the other side of the View.

Let me know if you manage to accomplish that.

joeljos commented 9 years ago

Thank you for the comment. Let me try out and see how it goes. As i am completely new to android, i will need all the luck i can muster to see this through ;).

Thanks, Joel.

On Thu, Jul 16, 2015 at 10:57 PM, Bartosz Lipinski <notifications@github.com

wrote:

Hi Joel! First of all thanks for the kind words, they are much appreciated.

I originally wanted to include anchoring to both sides of the stack view (top and bottom for the vertical stack, and left and right for the horizontal one) in the update that was introducing orientation. Unfortunatelly I reliased that the thing was not trivial enough for me to include it in the somehow "quick-and-easy-in-between-coffies-update" that I was doing. It still holds one of the top spots on my to-do list, but currently I'm terribly, terribly short on time. For now I can at least share what I come up with, when I was thinking about it (although bare in mind that I might be wrong on my conclusions [image: :stuck_out_tongue:], so dont stick to them at all costs).

First of all, I think you can accomplish that without touching OrientedViewPager (I wanna avoid messing with it since it's just an original android's ViewPager with changing orientation capabilities, nothing more). I think you need to first turn on the reverseDrawingOrder in the setPageTransformer http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setPageTransformer(boolean,%20android.support.v4.view.ViewPager.PageTransformer) method. And modify StackPageTransformer in a way that can show Stack being anchored on the other side of the View.

Let me know if you manage to accomplish that.

— Reply to this email directly or view it on GitHub https://github.com/blipinsk/FlippableStackView/issues/3#issuecomment-122028646 .

"it's not the years in your life that count. It's the life in your years." Abraham Lincoln

Giosk commented 8 years ago

Hi Blipinsk, your library is very good and I would like to insert it in my project, really a great job! I would use it for reading docs and books and I was trying to figure out if it would be possible to change the flipping orientation from right to left and not only from left to right when I found this issue. Do you have some news about it? ;-)

Thanks, Giosk.