android高仿项目,one一个高仿开源项目

SimpleOne

高仿韩寒的one一个,基于react-native实现的客户端

先上目前的效果图:

c16689e1-669e-4649-ac3e-1f4b63352932

c4d79208-fe0a-4c9f-85ef-702d49899eb4

c8f482b9-ff4b-4b6b-992a-23960490e0a1

11a11bb9-3208-4573-8710-a2d6038c18e2

6caf2a16-403b-4fd6-9fc6-70d44727b441

faecf0c7-3158-4463-9a79-f59827625d95

ce87dc2c-814f-4471-a50d-665e37174b27

5e6628f4-d4b1-4c17-8d61-af47974c6c50

cbe65d2f-5f48-455c-a302-c57f73838963

9ca2b782-0eec-47de-82f7-803a547da273

06a24b4b-5247-470d-b3dd-c5f476ebc4e5

5d78de3a-06b4-4ca7-883e-a9762e2928ab

7dfc6660-ab5b-488f-b848-76bfe458d0e2

如何运行

确保的你编译设备和运行设备在同一网络下,并且配置开发设置中的主机ip和端口号(Dev settings -> Debug server host & port for device)

1. 在命令行输入, react-native start

2. 选择你的运行设备, run app

api接口清单

这里对提取出的api接口做个记录,本人以学习为目的,希望读者也不要用于任何商业项目中,目前列出的接口是基于4.3.4的android版:

one首页(第一页,date=0,更多页date=yyyy-MM-dd)

http://v3.wufazhuce.com:8000/api/channel/one/{date}/0

专题列表(第一页,last_id=0,更多页last_id=上次请求结束的id)

http://v3.wufazhuce.com:8000/api/banner/list/4?last_id={last_id}

横着的列表(所有人问所有人)

http://v3.wufazhuce.com:8000/api/banner/list/5

近期热门作者

http://v3.wufazhuce.com:8000/api/author/hot

one首页菜单跳转

问答

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/question/{content_id}

http://v3.wufazhuce.com:8000/api/question/htmlcontent/{content_id}

连载

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/serial/{content_id}/0

http://v3.wufazhuce.com:8000/api/serialcontent/htmlcontent/{content_id}

音乐

http://v3.wufazhuce.com:8000/api/music/htmlcontent/{content_id}

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/music/{content_id}/0

电影

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/movie/{content_id}/0

http://v3.wufazhuce.com:8000/api/movie/htmlcontent/{content_id}

文章内容和作者

http://v3.wufazhuce.com:8000/api/essay/htmlcontent/{content_id}

文章评论

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/essay/{content_id}/0

搜索模块分类跳转(category_id,0图文 3问答 1阅读 2连载 5影视 4音乐 8电台)

http://v3.wufazhuce.com:8000/api/all/list/{category_id}

one首页和专题列表的item点击阅读跳转详情和获取评论

问答

http://v3.wufazhuce.com:8000/api/question/htmlcontent/{content_id}

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/question/{content_id}

连载

http://v3.wufazhuce.com:8000/api/serialcontent/htmlcontent/{content_id}

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/serial/{content_id}/0

音乐

http://v3.wufazhuce.com:8000/api/music/htmlcontent/{content_id}

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/music/{content_id}/0

电影

http://v3.wufazhuce.com:8000/api/movie/htmlcontent/{content_id}

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/movie/{content_id}/0

文章内容和作者

http://v3.wufazhuce.com:8000/api/essay/htmlcontent/{content_id}

文章评论

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/essay/{content_id}/0

电台

http://v3.wufazhuce.com:8000/api/radio/htmlcontent/{content_id}

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/radio/{content_id}/0

专题

http://v3.wufazhuce.com:8000/api/topic/htmlcontent/{content_id}

http://v3.wufazhuce.com:8000/api/comment/praiseandtime/topic/{content_id}/0

作者页

http://v3.wufazhuce.com:8000/api/author/works?page_num={page_num}&author_id={author_id}&version=4.3.4

功能模块:

根据android 4.3.4整理:

一级界面:

欢迎界面,按星期几展示不同的欢迎界面

one分页,也是首页,展示今日列表(插图,one-story, 问答,文章,影视,音乐,电台),折叠菜单,可翻页查看以前的列表,每翻一页,查看前一天的内容,列表头部可以下拉刷新。

all分页,长列表展示,顶部banner,分类导航,专题列表(下拉到底部以后,可加载更多),列表头部可以下拉刷新。

me分页,个人资料页,未登录时,为登录界面入口和设置入口

二级界面:

设置界面

阅读界面

登录界面

分享界面

搜索界面

第三方平台分享,登录sdk对接

音乐、电台播放和控制面板

当前未完成部分:

阅读界面js回调(包含音乐播放)夜间模式

设置模块缓存

阅读界面交互动画

one分页翻页标题动画

目前用到的技术:

以前大部分使用ES5,目前已全部改为ES6

react-native对原生组件进行了封装。

基本控件的使用 View,Text,Image,ScrollView,ListView,WebView,Clipboard,Platform,TouchableOpacity,ActivityIndicator,StatusBar,SliderBar。

动画的调用,Animated,Easing

计时器的使用,react-timer-mixin

react-native调用原生模块(原生toast,调android第三方分享sdk)

底部导航栏TabNavigator,页面导航Navigator

子组件的封装,调用以及回调

父组件和子组件之间的参数传递

页面导航跳转时的参数传递,以及回调

下拉刷新,第三方react-native控件的引入( react-native-pull ),并进行部分修改

自定义折叠控件(one分页中的菜单)实现折叠动画

自定义banner控件,实现all分页中的广告栏展示

自定义加载更多控件,监听ScrollView的滑动,实现加载更多

自定义阅读界面loading时的帧动画展示

半透明界面,悬浮窗实现,自定义单选对话框实现

相册,拍照实现,react-native第三方库接入

调用基于Android原生封装的ui控件

在Android原生项目的基础上引入react-native框架进行混合开发

音乐专辑封面旋转动画(解决动画循环播放中的暂停与播放事件),通过直接修改属性setNativeProps实现帧动画提高性能

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值