All Projects → TheseYears → CoreLibs

TheseYears / CoreLibs

Licence: other
MVP-Based, RxJava, RxAndroid, Retrofit, Glide, ButterKnife, RxBus...

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to CoreLibs

AndroidStarterAlt
A sample View-based Android app using the MVP architecture. It uses Mosby, Dagger2, RxJava, retrofit, LoganSquare, requery, EventBus, Conductor.
Stars: ✭ 27 (-30.77%)
Mutual labels:  mvp
mvvm
简易mvvm模式实现。
Stars: ✭ 37 (-5.13%)
Mutual labels:  mvp
P-MVP
[停止维护]基于 dagger.android,简单实用的 MVP 框架
Stars: ✭ 15 (-61.54%)
Mutual labels:  mvp
android-convention-cheatsheet
Android Naming Convention Cheat Sheet
Stars: ✭ 52 (+33.33%)
Mutual labels:  mvp
AlquranQ
Terjemahan Alquran Bahasa Indonesia & Bahasa Inggris
Stars: ✭ 26 (-33.33%)
Mutual labels:  mvp
flutter fish
仿闲鱼 flutter demo
Stars: ✭ 19 (-51.28%)
Mutual labels:  mvp
Trickl
trickl torrent client
Stars: ✭ 50 (+28.21%)
Mutual labels:  mvp
Core-iOS-Application-Architecture
Core iOS Application Architecture - The development paradigm of clean, testable code and modular iOS applications. + Xcode templates
Stars: ✭ 123 (+215.38%)
Mutual labels:  mvp
wikilight
A lightweight Wikipedia Client
Stars: ✭ 50 (+28.21%)
Mutual labels:  mvp
weather
基于MVP的安卓天气demo
Stars: ✭ 49 (+25.64%)
Mutual labels:  mvp
ProjectPatternStudy
Android MVC、MVP、MVVM-databinding、MVP-databinding 架构单元示例
Stars: ✭ 32 (-17.95%)
Mutual labels:  mvp
wanandroid kotlin
玩安卓Kotlin版,MD + Retrofit + RxJava + MVP + AndroidX
Stars: ✭ 33 (-15.38%)
Mutual labels:  mvp
MVP Project
mvp 案例
Stars: ✭ 43 (+10.26%)
Mutual labels:  mvp
Eva
Eva and Wall-e
Stars: ✭ 131 (+235.9%)
Mutual labels:  mvp
Damon
Android MVP
Stars: ✭ 12 (-69.23%)
Mutual labels:  mvp
Starwars-clean
Simple project with clean architecture
Stars: ✭ 34 (-12.82%)
Mutual labels:  mvp
Dribbble
根据Dribbble 网站开源的API,将世界各大优秀设计师的作品,展示出来,用于学习MD设计和流式编程。项目采用Google设计规范Material Design设计开发,基础架构采用MVP模式进一步解耦, 使用流式编程框架RxJava + RxAndroid ,结合Retrofit客户端库组织网络框架,图片缓存库采用Google。
Stars: ✭ 20 (-48.72%)
Mutual labels:  mvp
mvp-sample
一个简单的MVP示例,和传统不一样的是,我们把Activity/Fragment作为Presenter,把View单独提出来,扩展了Presenter的能力。
Stars: ✭ 41 (+5.13%)
Mutual labels:  mvp
mvp-monitor
📊 Microsoft MVPs Monitor
Stars: ✭ 30 (-23.08%)
Mutual labels:  mvp
Li-MVPArms
这个项目会持续更新
Stars: ✭ 17 (-56.41%)
Mutual labels:  mvp

CoreLibs

这是一个MVP-Based, 集成了很多常用库, 工具以及控件的库集合, 旨在提高开发效率并保证一定的代码质量.

关于工程

  • 请使用Android Studio 3.0以上版本编译, Gradle版本3.0.1, buildToolsVersion 26.0.2, 请根据需要自行选择.
  • app模块中包含MVP的使用示例-调用GitHub的搜索接口(关键词CoreLibs)并用RecyclerView显示出来(带有分页).
  • app模块中包含一些项目基础代码, 以及一些个人常用的工具和控件, 这些工具和控件不完全具备通用性, 因此没法放在CoreLibs下.

截图

screen shot

引入方法

  • 下载CoreLibs
  • 新建一个Android工程
  • 将CoreLibs文件夹下的CoreLibs作为一个Module导入该项目
  • 主模块添加CoreLibs的依赖
  • 主模块添加RxGalleryFinal的依赖
  • 主模块添加butterknife的依赖
  • 在最外层的build.gradle文件中添加maven库:
....
allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

  • 主模块添加如下代码以开启lambda语法:
android {
    ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
  • 新建一个Application类并在onCreate中加入如下代码:
GlobalExceptionHandler.getInstance().init(this, getResources().getString(R.string.app_name)); //初始化全局异常捕获
ToastMgr.init(getApplicationContext()); //初始化Toast管理器
Configuration.enableLoggingNetworkParams(); //打开网络请求Log打印,需要在初始化Retrofit接口工厂之前调用
ApiFactory.getFactory().add(Urls.ROOT_API); //初始化Retrofit接口工厂
PreferencesHelper.init(getApplicationContext()); //初始化SharedPreferences工具类

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
    // android 7.0系统解决拍照报exposed beyond app through ClipData.Item.getUri()
    StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
    StrictMode.setVmPolicy(builder.build());
    builder.detectFileUriExposure();
}
  • 根据服务器接口返回JSON的结构, 新建一个实体类, 并实现IBaseData.
  • 根据需要项目的主题可以使用CoreLibs中的AppBaseCompactTheme.
  • 如果在Application中初始化了GlobalExceptionHandler还需要在Manifest中加入如下声明:
<activity
    android:name="com.corelibs.exception.ExceptionDialogActivity"
    android:screenOrientation="portrait"
    android:theme="@style/ExceptionDialogStyle" />

<activity
    android:name="com.corelibs.exception.ExceptionDetailActivity"
    android:screenOrientation="portrait" />

使用方法

请参考 https://ryan-8.gitbook.io/android-architecture-journey/

Change Log

  • 2016-02 完善雏形
  • 2016-04 完善 文档
  • 2016-09-07 添加Studio插件 MvpClassesGenerator
  • 2016-09-22
    • 扩展Adapter相关工具类
      • 添加多布局支持
      • 添加RecyclerView支持
      • 添加RecyclerView的多布局支持
    • 添加RecyclerView的Header, Footer支持
    • 扩展PTR组件
      • 添加对RecyclerView的支持
  • 2016-12 添加对透明状态栏的支持
  • 2017-01
    • BaseRecyclerAdapter默认直接支持添加header与footer
    • 重构分页方式
    • 需要使用新的 MvpClassesGenerator 插件
  • 2018-04
    • 修改项目目录为可执行的application,包含CoreLibs模块,而非一个单独的android module
    • 从RxJava1升级至RxJava2
    • 各个库均升级至较新版本
      • glide -> 4.6.1
      • butterknife -> 8.8.1
      • rxjava -> 2.1.12
      • rxandroid -> 2.0.1
      • rxlifecycle -> 2.2.1
      • retrofit -> 2.4.0
      • material-dialogs -> 0.9.6.0
      • RxGalleryFinal -> 1.1.3
    • 引入lambda语法
    • 升级GalleryFinal至RxGalleryFinal,但由于有一点不太满意的地方,因此fork到本地做了些修改
      • 微调ToolBar样式,微调列表样式
      • 修改某些文件夹有图片但显示不出来的限制
      • 升级UCrop至2.2.2,微调UCrop ToolBar样式
      • 修复MediaActivity可能会内存泄漏的问题
  • 2018-05
    • 弃置AndroidBug5497Workaround,无法兼容现有全面屏,在全面屏手机关闭了底部导航栏并且开启了全屏手势后,以小米为首的手机获取底部栏的高度是错误的
    • 新增ResizeLinearLayout、ResizeRelativeLayout、ResizeFrameLayout,在设置了布局根部使用此控件并且加上android:fitsSystemWindows="true"即可解决Activity在全屏下,同时windowSoftInputMode为adjustResize时,软键盘弹起却不会Resize布局的情况。
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].