Drag elements from ScrollView to View - react-native

It is already a few days i am working an a case but can't manage. I have View and ScrollView in it, in ScrollView I can drag my elements but when trying to drag element from ScrollView to my view can't get it out from the ScrollView. My question is it possible to drag element from ScrollView to View, if yes, please help me how can I do it.

Related

Scroll through the contents of a RecyclerView using an outer ScrollView

I have a RecyclerView located at the bottom of the inside of a vertical ScrollView. Now each RecyclerView item has an OnClickListener which "expands" the item's layout so that more details are shown. Now i noticed that when i have multiple item layouts expanded and i try to scroll up and down, logically the scroll is happening inside of the RecyclerView first thus :
Scrolling at a lower speed than it would be if it was scrolling outside of the RecyclerView and inside of the ScrollView
When you scroll upwards , the scrolling comes at a stop as you reach the top of the RecyclerView and then you need to scroll again to scroll through the rest of the ScrollView layout.
Furthermore, since the bottom part of the whole layout is occupied by the RecyclerView, in order to scroll upwards within the parent scrollview, you need to scroll to the top of the RecyclerView first, hit the top (where the indicator lights up) and then scroll upwards again.
Is there any way that i can use the outer ScrollView to scroll through the RecyclerView items and their expanded layouts? Can i scroll through the main layout when i'm scrolling from within the recyclerview?
A NestedScrollView should be used instead of ScrollView, that is if you want to stick with scroll views in general.
This approach is also explained here.
Or you can replace the entire scroll view with a large RecyclerView. It can be vanilla or with Epoxy.

React Native: How to make ScrollView scroll for just one item in it?

I have an image rendered inside a scrollview component and the dimensions of the image are fixed as (height: 200, and width from device dimension).
Also the style of the scrollview is set as (flex: 1 not contentContainerStyle).
But the image doesn't scroll properly and snaps back when I scroll.
I understand that this is because there is only one item in the scrollView.
How to force scroll the content inside the scrollView even if there is only one item in it?
Try wrapping your ScrollView within a an enclosing

Scroll to a component is a Scrollview in react-native

I want to be able to scroll a child component so that it visible on screen. How can I tell a react-native ScrollView or ListView to centre, or at least move to a certain component?
Both ScrollView and ListView have method scrollTo, so you can calculate position where you need to scroll

Horizontally and vertically scrolling table view

I am trying to create a table view that scrolls horizontally and vertically like TeacherKit app.
If I scroll vertically, first row is fixed and if I scroll horizontally, first column is fixed.
Do you guys have any suggestions for that?
This is the screenshot from TeacherKit app.
https://www.dropbox.com/s/65cknxg9vnea8jq/Photo%20Nov%2015%2C%2012%2027%2010%20AM.png
The most common solution is to create a UIScrollView with the same size of your UITableview, and place your table INSIDE the scroll view.
In this situation, the table won't scroll because is fully contained in the scrollView (it has the same size) and you will scroll the scrollView
Let us know how it goes!

Make detail side of splitViewController scrollable?

I am trying to imbed a scrollView in the detail side of a splitViewController. Should the scrollView be added inside the 'View', as displayed in the image below?
Or does the 'View' need to be removed, leaving a View Controller and a Scroll View only?
Also, when I add the scrollView to the page, the bottom is being cut off, preventing it from scrolling all the way to the bottom. I also tried resizing the scrollView in the ViewDidLoad method of the View Controller to something extremely large such as:
theScrollView.contentSize = CGSizeMake(20000, 20000);
That did not work either. It seems that we can hold down the mouse and pan, but the scroll bars are always the same length. Thanks your help!
I have ALWAYS implemented scrollviews as the UIScrollView with a UIView inside of it, then your other elements (i.e. buttons, text views, etc...) SO the hierarchy would be
UIScrollView
UIView
UILabel
UIButton
.
.
.
Because you dont really have a top UIView WITHIN the scrollview, this is most likely why your
theScrollView.contentSize = CGSizeMake(20000, 20000);
line is not working as intended.