Coder Social home page Coder Social logo

react-native-oneless's Introduction

react-native-OneLess

一个APP的RN版本。

###问题总结:

  • Q1:页面设置视图位置跟随Tab的点击,初始想法是通过Route切换View。但是这样会造成一个问题就是切换View的时候就要刷新页面,会重新走一遍生命周期。造成页面的卡顿,体验很差。然后想到使用Android中的ViewPager+Fragment的想法。 外面使用禁止滑动的ViewPager,每个Item内部可以使用Swiper或者自定义就可以了。
    • 方案如上,但是遇到的问题有:Swiper的底层是分平台,Android使用ViewPagerAndroid IOS使用ScrollView,在ViewPagerAndroid上使用setPage可以进行点击切换View。 但是ScrollView无这个方法。 所以重新定制了一下Swiper组件,写setPage方法也是分平台。 Android通过setPage进行切换, IOS通过scrollTo进行切换, 同时给出animated的参数,也可以设置移动效果,但是默认禁止了。
  • Q2:PicSwipe进行处理:在底层通过绝对布局固定视图,根据手势对View进行变化。
  • Q3:Swipe动态添加Item的处理,Item根据首页请求的ListIndex再次获取数据。 

####元旦了,Mifind祝大家新年快乐~ ####又clone了一个Github的博客,不知道他能活到几月份。 ####目前进度见图片:

####目前问题:   * PICTURE:左滑刷新,右滑十页进入历史菜单未完成   * 收藏、分享问题   * RN如何打无服务器签名包问题。

react-native-oneless's People

Contributors

ulanxx avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.