Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaxchow/react-native-rebound-scrollview
https://github.com/jaxchow/react-native-rebound-scrollview
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jaxchow/react-native-rebound-scrollview
- Owner: jaxchow
- Created: 2015-11-24T05:48:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-23T02:30:11.000Z (almost 9 years ago)
- Last Synced: 2024-11-20T20:16:06.048Z (22 days ago)
- Language: Java
- Size: 4.75 MB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-react-native - react-native-rebound-scrollview ★12 - React Native Android ReboundScrollView implementation. (Components / UI)
- awesome-react-native - react-native-rebound-scrollview ★12 - React Native Android ReboundScrollView implementation. (Components / UI)
- awesome-react-native - react-native-rebound-scrollview ★12 - React Native Android ReboundScrollView implementation. (Components / UI)
- awesome-react-native - react-native-rebound-scrollview ★12 - React Native Android ReboundScrollView implementation. (Components / UI)
- awesome-react-native-ui - react-native-rebound-scrollview ★8 - React Native Android ReboundScrollView implementation. (Components / UI)
README
# React Native ReboundScrollView
support android rebound ScrollView, compatible ios -- use react scrollview![screen](./screen.gif)
![screen2](./screen2.gif)## Usage
##AndroidIn android/setting.gradle
```
...include ':app',':ReboundScrollView'
project(':ReboundScrollView').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-rebound-scrollview/android/app')```
In android/app/build.gradle```
...
dependencies {
...
compile project(':ReboundScrollView')
}
```
Register module (in MainActivity.java)```
import com.jg.zhang.scrollview.ReboundScrollViewPackage; // <------ add herepublic class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
......@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mReactRootView = new ReactRootView(this);mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
.addPackage(new MainReactPackage())
.addPackage(new ReboundScrollViewPackage(this)) // <------ add here
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();mReactRootView.startReactApplication(mReactInstanceManager, "ExampleRN", null);
setContentView(mReactRootView);
}......
}
```> 基本功能已现实,还存在BUG,后续完善
### Example
```js
var ArticleDetailView = React.createClass({
render:function(){
return(
In iOS, the way to display formatted text is by using NSAttributedString: you give the text that you want to display and annotate ranges with some specific formatting. In practice, this is very tedious. For React Native, we decided to use web paradigm for this where you can nest text to achieve the same effect.
)
}
});
```