Skip to content

Commit

Permalink
修正首页的说明文档
Browse files Browse the repository at this point in the history
  • Loading branch information
石破天 committed Feb 25, 2019
1 parent 1bb97d6 commit 4ab7a62
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 17 deletions.
1 change: 0 additions & 1 deletion Examples/LargeListExamples/HeightEqualExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export class HeightEqualExample extends React.Component {
}
return (
<LargeList
style={styles.container}
data={data}
heightForSection={() => 50}
renderSection={this._renderSection}
Expand Down
17 changes: 8 additions & 9 deletions Examples/WaterfallListExamples/PictureExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@ export class PictureExample extends React.Component {
render() {
const screenWidth = Dimensions.get("window").width;
return (
<SafeAreaView style={{ flex: 1 }}>
<WaterfallList
data={this.state.data}
heightForItem={item => screenWidth/Math.floor(screenWidth / 150) * +item.showimg_height / +item.showimg_width}
preferColumnWidth={150}
renderItem={this._renderItem}
/>
</SafeAreaView>
<WaterfallList
data={this.state.data}
heightForItem={item => screenWidth / Math.floor(screenWidth / 150) * +item.showimg_height / +item.showimg_width}
numColumns={2}
// preferColumnWidth={150}
renderItem={this._renderItem}
/>
);
}

_renderItem = item => {
return <Image source={{ uri: item.showimg }} style={{ flex: 1,margin:5 }} />;
return <Image source={{ uri: item.showimg }} style={{ flex: 1, margin: 5 }} />;
};
}
66 changes: 60 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@

## Features

* Large data source list component, items reused by group, Less CPU/Memory usage.
* Large data source list component, items reused by group, Less CPU/Memory usage. Never blanks.
* Fully Cross-platform bounces (iOS & Android).
* Highly customize Refreshing and Loading. Fully support `react-native-lottie`. More smoothly animation.
* Header and Footer support.
* ScrollToIndex support.
* Sticky Section support.
* Support inverted.
* Never blanks.

## Preview
![Preview](./docs/res/LottieRefreshing.gif)
Expand Down Expand Up @@ -49,6 +44,65 @@ yarn start

6. Running

### LargeList

All the features below are supported on both iOS and Android.

* Items reused. Never blank.

* Sticky section support

![StickySection](./docs/res/StickySection.gif)

* Fully Cross-platform bounces (iOS & Android).

![bounces](./docs/res/bounces.gif)

* Customize refreshing (Support `lottie-react-native` progress with `useNativeDriver`)

![CustomizeRefreshing](./docs/res/CustomizeRefreshing.gif)

* Customize loading (Support `lottie-react-native` progress with `useNativeDriver`)

![CustomizeLoading](./docs/res/CustomizeLoading.gif)

* Slide on both horizontal and vertical directions.

![BothDirections](./docs/res/BothDirections.gif)

* Sticky header support.

![StickyHeader](./docs/res/StickyHeader.gif)

* directionalLockEnabled

![directionalLockEnabled](./docs/res/directionalLockEnabled.gif)

* Support `inverted`

![inverted](./docs/res/inverted.gif)

### WaterfallList

* Complex situation

![WaterfallExample](./docs/res/WaterfallExample.png)

* preferColumnWidth

![preferColumnWidth](./docs/res/preferColumnWidth.gif)

* numColumns

![numColumns](./docs/res/numColumns.gif)

### StickyForm

* example

![StickyFormExample](./docs/res/StickyFormExample.gif)


## License

react-native-largelist is released under the MIT license. See LICENSE for details.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/V3/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

LargeList V3 depends on `react-native-spring-scrollview@^2.0.3`, and supports almost all props in SpringScrollView.

As the same as SpringScrollView,LargeList must have a bounded height in order to work, since they contain many cells children into a bounded container (via a scroll interaction). In order to bound the height of a LargeList, either set the height of the view directly (discouraged) or make sure all parent views have bounded height. LargeList default has a `{flex:1}` style,please be sure its parent has a bounded height.
As the same as SpringScrollView,LargeList must have a bounded height in order to work, since they contain many cells children into a bounded container (via a scroll interaction). In order to bound the height of a LargeList, either set the height of the view directly (discouraged) or make sure all parent views have bounded height. LargeList default has a `{flex:1}` style,please be sure its parent has a bounded height. Note that in order to optimize performance, the height of each item and each section must be given.

### Basic Props

Expand Down
Binary file added docs/res/BothDirections.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/CustomizeLoading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/CustomizeRefreshing.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/res/StickyFormExample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/StickyHeader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/StickySection.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/bounces.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/directionalLockEnabled.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/inverted.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/numColumns.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/res/preferColumnWidth.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/Types.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface LargeListPropType {
headerStickyEnabled?: boolean;
contentStyle?: ViewStyle,
directionalLockEnabled?: boolean,
renderScaleHeaderBackground?: () => React.ReactElement<any>,
heightForSection?: (section: number) => number,
renderSection?: (section: number) => React.Node<any>,
heightForIndexPath: (indexPath: IndexPath) => number,
Expand Down

0 comments on commit 4ab7a62

Please sign in to comment.