界面高仿微信,数据来自新浪微博API。
仅供大家学习交流,不得用于商业用途。
项目简述
项目采用MVP-Rxjava设计模式,完全Material Design风格,实现了微信的部分界面功能。APK下载
欢迎界面
仿网易新闻客户端,在右上角添加了圆环倒计时的“跳过”功能,用于广告展示。
主界面
“微信”标签页
因为新浪微博API没有返回私信的接口,所以直接展示聊天的界面,采用图灵聊天机器人进行会话。
“通讯录”标签页
根据姓名拼音进行分组排序,并实现了字母导航功能。另外ActionBar上点击“+”出现的菜单,能正常显示在ActionBar之下,是仿照系统中的ShareActionProvider,重写onCreateActionView()方法实现的。其实通过自定义ActionBar的布局能实现相同的界面效果,可能还更简单些。
“发现”和“我”标签页
这两个标签页的数据简单、重复,故将布局类型分为了三类:间隔、菜单、个人信息,在RecyclerView.Adapter中采用聚合模式方便扩展。
朋友圈
- 头部使用AppBarLayout加CollapsingToolbarLayout实现可伸缩效果。
- 使用SwipeRefreshLayout进行下拉刷新,上滑更多通过RecyclerView的addOnScrollListener实现。
- 微博中的文字中关键字高亮、表情替换,参考高仿新浪微博文字处理。
- 图片查看使用的开源控件PhotoView。
技术交流
邮箱:csumissu@icloud.com
参考项目
依赖包
-
ButterKnife Bind Android views and callbacks to fields and methods.
-
RetroLambda A gradle plugin for getting java lambda support in java 6, 7 and android
-
RxJava Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
-
RxAndroid RxJava bindings for Android
-
RxLifecycle Lifecycle handling APIs for Android apps using RxJava
-
Glide An image loading and caching library for Android focused on smooth scrolling
-
Retrofit Type-safe HTTP client for Android and Java by Square, Inc.
-
OkHttp An HTTP+HTTP/2 client for Android and Java applications.
-
Gson A Java serialization/deserialization library that can convert Java Objects into JSON and back.
-
PhotoView Implementation of ImageView for Android that supports zooming, by various touch gestures.
-
RecyclerView-FlexibleDivider Android library providing simple way to control divider items (ItemDecoration) of RecyclerView
-
BottomNavigationBar This Library helps users to use Bottom Navigation Bar (A new pattern from google) with ease and allows ton of customizations
-
CircleIndicator A lightweight viewpager indicator like in nexus 5 launcher
-
ProgressWheel A progress wheel for android, intended for use instead of the standard progress bar.
-
JPinyin JPinyin是一个汉字转拼音的Java开源类库