All Projects → janiokq → react-native-nlist

janiokq / react-native-nlist

Licence: other
原生Listview Native lListView react-native encapsulation Memory recovery reusing High performance

Projects that are alternatives of or similar to react-native-nlist

Commonadapter
一个适用于ListView/GridView/RecyclerView的Adapter库,简化大量重复代码,支持多种布局,可自定义图片加载的实现。
Stars: ✭ 219 (+265%)
Mutual labels:  listview, recyclerview
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (+106.67%)
Mutual labels:  listview, recyclerview
Admobadapter
It wraps your Adapter to display Admob native ads and banners in a ListView/RecyclerView data set. It based on the Yahoo fetchr project https://github.com/yahoo/fetchr
Stars: ✭ 224 (+273.33%)
Mutual labels:  listview, recyclerview
Easyadapter
Android 轻量级适配器,简化使用,适应所有的AbsListView、RecyclerView。支持HeaderView与FooterView~
Stars: ✭ 160 (+166.67%)
Mutual labels:  listview, recyclerview
GenericAdapter
⛳️ Easy to use android databinding ready recyclerview adapter
Stars: ✭ 26 (-56.67%)
Mutual labels:  listview, recyclerview
Placeholderview
This library provides advance views for lists and stacks. Some of the views are build on top of RecyclerView and others are written in their own. Annotations are compiled by annotation processor to generate bind classes. DOCS -->
Stars: ✭ 2,104 (+3406.67%)
Mutual labels:  listview, recyclerview
Shswiperefreshlayout
Android 升级版 SwipeRefreshLayout,支持RecyclerView、ScrollView等大部分组件,下拉刷新(Refresh)和上拉加载(Loadmore),支持自定义HeaderView和FooterView
Stars: ✭ 236 (+293.33%)
Mutual labels:  listview, recyclerview
Countdowntask
⌛️A countdown library for Android.
Stars: ✭ 64 (+6.67%)
Mutual labels:  listview, recyclerview
InfiniteScroll
You can do a Endless scroll in ListView or RecyclerView with simple steps, with a listener for do request to your web service.
Stars: ✭ 28 (-53.33%)
Mutual labels:  listview, recyclerview
TwerkyListView
A beautifully animated recycler-list-view, that twerks the way African earthworms do in order to move
Stars: ✭ 19 (-68.33%)
Mutual labels:  listview, recyclerview
Kotlin Adapter
🔥 RecyclerView,AbsListView适配器, 支持多种视图样式, 支持吸顶、侧滑删除、拖拽效果
Stars: ✭ 132 (+120%)
Mutual labels:  listview, recyclerview
GenericRecyclerAdapter
Easiest way to use RecyclerView. Reduce boilerplate code! You don't need to write adapters for listing pages anymore!
Stars: ✭ 53 (-11.67%)
Mutual labels:  listview, recyclerview
Swipemenulayout
🔥一个零耦合的侧滑菜单,支持RecyclerView、ListView、GridView等不同条目布局,支持菜单在左或在右,可选滑动阻塞,是否禁用等功能
Stars: ✭ 120 (+100%)
Mutual labels:  listview, recyclerview
Smilerefresh
微笑下拉刷新。这是在 SwipeRefreshLayout基础上修改的下拉刷新库。
Stars: ✭ 203 (+238.33%)
Mutual labels:  listview, recyclerview
Videolistplayer
Play video in ListView or RecyclerView
Stars: ✭ 1,308 (+2080%)
Mutual labels:  listview, recyclerview
Overscroll Decor
Android: iOS-like over-scrolling effect applicable over almost all scrollable Android views.
Stars: ✭ 2,671 (+4351.67%)
Mutual labels:  listview, recyclerview
Multi type list view
A flutter customer ListView that displays multiple widget types.
Stars: ✭ 47 (-21.67%)
Mutual labels:  listview, recyclerview
Ultimaterefreshview
UltimateRefreshView 实现下拉刷新,上拉加载更多的轻量级库;支持RecyclerView ,ListView ,ScrollView & WebView
Stars: ✭ 64 (+6.67%)
Mutual labels:  listview, recyclerview
PinnedSectionRecyclerView
simple RecyclerView with pinned sections for Android.
Stars: ✭ 21 (-65%)
Mutual labels:  listview, recyclerview
android-page
android 分页列表数据加载引擎,主要封装了android分页列表数据加载的各个组件,如果你有一个需要分页加载的List列表,都可以使用此框架实现。
Stars: ✭ 15 (-75%)
Mutual labels:  listview, recyclerview

react-native-nlist

react-nativ listView Performance solution Native implementation Smooth memory recovery Pull up refresh drop-down loading Support native custom refreshing animation Support itemView dynamic height

Performance is better than all current list components.

中文

Android demo apk download

IOS Use TabView implementation

Be based on react-native-tableview

Android Use Recyclerview implementation

Recycling using duplicate templates

Performance testing

####ios use iphone 6s 10015 data, lots of pictures. No use of SDWebImage to optimize images. Fast slide to 4679th data Memory usage 111 MB avatar

Android use MI 6 10015 data, lots of pictures. No use of Glide to optimize images.

Fast slide to 2569th data Android's list scroll speed has a maximum threshold. I plan for 2 minutes. Hand pain ~~(╯﹏╰) Memory usage 123 MB
avatar

installation

$ npm install react-native-nlist --save

configuration

iOS

  1. In XCode, in the project navigator, right click your project name Add Files to
  2. Go to node_modulesreact-native-nlist and add /node_modules/react-native-nlist/ios/RNNlistcode
  3. Add MJRefresh use cocoapods Create podfile under your IOS project /ios/Podfile
 # Uncomment the next line to define a global platform for your project
platform :ios, '8.0'
target 'demo' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  # Pods for Driver
  use_frameworks!
  pod 'MJRefresh'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.0'
    end
  end
end

pod 'MJRefresh' Execute a command pod install 4. Run your project .xcworkspace (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.janiokq.Nlist.RNNlistPackage; to the imports at the top of the file
  • Add new RNNlistPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-nlist'
    project(':react-native-nlist').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-nlist/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-nlist')
    

Attribute description

onScroll

ios is Height of content android is The last rolling start difference The negative number is upward. The positive number is downward.

onScrollto

only android o and 1 value 1 Scroll to the head 0 Scroll to the bottom

reactModuleForCell

ios  Template name     AppRegistry.registerComponent   generate
  
AppRegistry.registerComponent('Itemlist', () => Itemlist);

renderItem

android  Template name     A class name or function name.   

springback

android specific scroll rebound effect similar to IOS

canRefresh

Whether to use drop-down refresh

canLoadmore

Whether to use pull-up refresh

refreshState

Refresh state control

loadinState

Load state control

onRefresh

Refresh event

onLoadmore

Load event

dataSource

data source Array Object You must have the height attribute.

Usage

list Use

import RNNlist from 'react-native-nlist';

// TODO: What to do with the module?
RNNlist;

 <RNNlist
        onScroll={(e)=>{
          //ios is  Height of content
          //android is   The last rolling start difference       The negative number is upward.      The positive number is downward. 
          //direction
          // console.log(e.nativeEvent.contentOffset)


        }}
        // only  android
        onScrollto={(e)=>{
            // o and 1    
            // 1  Scroll to the head
            // 0  Scroll to the bottom
            //e
        }}
        inserttheway={0}
        //ios   Rendering template
        reactModuleForCell="Itemlist"
        //android  Rendering template
        renderItem={Itemlist}
        //Rendering initialization of Android
        Initializeprops={{}}

        //Android rolling rebound effect
        springback={true}
        //Android template quantity
        rowHeight={40}
        style={{
          width:width,
          height:height
        }}

        canRefresh={true}
        canLoadmore={true}

        refreshState={this.state.refreshState}
        loadinState={this.state.loadinState}
        dataSource={this.state.dataSource}

        onRefresh={()=>{
          setTimeout(()=>{
            this.getdata();
          },1000)
        }}
        onLoadmore={()=>{
          setTimeout(()=>{
            this.adddata();
          },1000)
        }}
    />
    

Template registration


class Itemlist extends  Component{
  constructor(props){
    super(props)
  }
  render() {
    let data  =  this.props;
    if(Platform.OS=='ios'){
        data =this.props.data;
    }

    return (
      <View style={{flex:1,}} >
            <View style={{
                width:width,
                height:data.height,
              }} >

              <Text>{data.index}</Text>

              <Image 
              // source={{
              //   uri:'http://img3.imgtn.bdimg.com/it/u=3360690558,3623061169&fm=11&gp=0.jpg'
              // }}
              source={{uri: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3360690558,3623061169&fm=111&gp=0.jpg'}}
              style={{
                width:width,
                height:data.height-30,
              }}
              resizeMode='stretch'
              />

              </View>
      </View>
    )
  }
}

AppRegistry.registerComponent('Itemlist', () => Itemlist);


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].