Is there any way to change the scrolling angle of the ScrollView or RecyclerView in android?
I know, by default some Android views will have horizontal and Vertical scrollings, but I want to know if it is possible to change the scroll in a particular angle or else diagonally?
How to create such custom components?
Here is an example with screenshots, I wonder how Microsoft Excel Android App achieved this.
Place your finger on the cell D10 and drag the sheet towards the cell A1
Here is the result, the sheet scrolled diagonally, i.e., scrolled vertically and horizontally simultaneously
Related
I would like to know what kind of layout is this? top image part (A) is pinch zoom (so I guess ImageView with something like photoView implemented), bottom part (C) is vertical scroll (so this would be RecyclerView), but middle part (B) dragger can be dragged up and down, thus enlarging the portion of one container (A or C) / reducing the portion of another, depending where is dragged.
I want to use a view flipper which works on a matrix and not a list which allowes me to either flip vertical or horizontal - but both at the same time. I know there are similar on lists working implementations like the DirectionalViewPager but they work on a list and the user has to configure if they want to flip horizontal or vertical exclusivly. I have a situation like in the image in mind:
The blue area is the current visible element. The grey boxes are the fragments the user can navigate to and from.
I have a custom component that is vertically longer than the screen height and I'm trying to make it scroll. In my onDraw method, I'm drawing the shapes unto a fixed coordinates, and it seems that the content doesn't change even when I scroll. Do I need to draw the shapes unto a different coordinates based on the scrolled position? If so, how do I retrieve the current scroll position?
If you don't want to handle any scrolling from your end, then add your customView to ScrollView. If you want to handle the scroll from your end then you can refer to thebelow link which is for 2Dscroll which handles both Horizontal and Vertical Scrolls.
Android Two-Dimensional ScrollView
I want to build a custom gallery.
a 2d Dimension gallery , user can swiping page vertical and horizontal.
i store information like a 2d map, each page have its x and y coordinate.
========================
like first page is (0,0)
upper of first page is (0,-1)
second page is (1,0)
========================
if upper of first page swiping right , then will go second page.
but i don't know how do i go forward.
Thanks
-- update --
more detail what i want.
originally gallery only have left and right swiping.
user see photo by swiping left or right.
now user not only swiping left or right, but also swiping up and down to see the photo.
data structure is, each page have own x and y coordinate.
It is very hard to give an answer for this - you mention no programming language nor more specifics of what it is you want to do.
I guess it depends on where you want this gallery - one solution could be to make it webbased - while this is a sidescroller and I am planning to use the top buttons to change the page you should think about it...
http://globability.org/webapp/androidtest_20111105_1.html
It is a rough prototype - scrolling sideways on the Android with buttons following top and bottom.
I am not sure how you'd go about the automatic changing of pages whether you should create a button boundry, or set some sort of a listener that follows the x,y coordinates in the visible viewport and set event listeners that are triggered when the visible area reaches specific coordinates, use a different layout than me off course - but it all depends on the programming language - the example is plain old HTML but you get the idea, and the listener thing for x/y in visible viewport should be valid for most modern programming languages.
how to overlap a horizontal gallery with a vertical gallery - has some ideas for how to create similar functionality
What is the best way to make scrollviews move dependent of each other?
I have three scrollers (ScrollView/HorizontalScrollView), on vertical on the left and one horizontal on te top - e.g. like excel - where moving the left or center scroller should affect vertical scrolling in both and moving top or center should affect horizontal scrolling in both.
What is the best way to implement this?