-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathInvertedScrollContentViewManager.java
More file actions
31 lines (25 loc) · 1.05 KB
/
InvertedScrollContentViewManager.java
File metadata and controls
31 lines (25 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package chat.rocket.reactnative.scroll;
import com.facebook.react.module.annotations.ReactModule;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.annotations.ReactProp;
import com.facebook.react.views.view.ReactViewManager;
/**
* View manager for InvertedScrollContentView. Behaves like a View but reports children in reversed
* order for accessibility so TalkBack matches the visual order in inverted lists.
*/
@ReactModule(name = InvertedScrollContentViewManager.REACT_CLASS)
public class InvertedScrollContentViewManager extends ReactViewManager {
public static final String REACT_CLASS = "InvertedScrollContentView";
@Override
public String getName() {
return REACT_CLASS;
}
@Override
public InvertedScrollContentView createViewInstance(ThemedReactContext context) {
return new InvertedScrollContentView(context);
}
@ReactProp(name = "isInvertedContent")
public void setIsInvertedContent(InvertedScrollContentView view, boolean isInverted) {
view.setIsInvertedContent(isInverted);
}
}