Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing Stack anchoring #3

Open
vijayrawatsan opened this issue Jun 17, 2015 · 4 comments
Open

Changing Stack anchoring #3

vijayrawatsan opened this issue Jun 17, 2015 · 4 comments
Assignees
Labels

Comments

@vijayrawatsan
Copy link

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

@vijayrawatsan vijayrawatsan changed the title Horizontal gravity only allows for swiping the views to right. Basically how to change the anchoring? Horizontal gravity only allows for swiping the views to right. I would like to swiping view to left. Basically how to change the anchoring? Jun 17, 2015
@blipinsk blipinsk changed the title Horizontal gravity only allows for swiping the views to right. I would like to swiping view to left. Basically how to change the anchoring? Changing Stack anchoring Jun 17, 2015
@blipinsk blipinsk self-assigned this Jun 17, 2015
@joeljos
Copy link

joeljos commented Jul 16, 2015

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
Copy link
Owner

blipinsk commented Jul 16, 2015

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 😛, 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
Copy link

joeljos commented Jul 17, 2015

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:
😛], 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
#3 (comment)
.

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

@Giosk
Copy link

Giosk commented Apr 29, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants