fss

Project Url: gongbox/fss
More: Author   ReportBugs   
Tags:

#

FSS 框架是为了更快速,更简单,更规范进行 Android 开发,他包含多个子模块,开发者可根据需要添加所需的依赖。

  • fss-bind 绑定框架,实现了多种绑定,简化 Activity/Fragment 的开发
  • fss-router 路由框架,使用注解的方式声明路由,使用接口管理路由方法,方便进行路由管理
  • fss-adapter 适配器,提供 ListView 以及 RecyclerView 的多种适配器,简化适配器开发
  • fss-runpriority 运行优先级,使用它可以实现在子类中自定义继承的方法的调用顺序

接入

在根项目的 build.gradle 文件中添加仓库地址

    allprojects {
       repositories {
     ...
     maven { url 'https://www.jitpack.io' }
       }
    }

对应模块添加依赖

    def fss_version = '1.0.35'
    implementation "com.github.gongbox.fss:adapter:$fss_version"              //适配器模块
    implementation "com.github.gongbox.fss:bind:$fss_version"                 //绑定
    implementation "com.github.gongbox.fss:runpriority:$fss_version"          //运行优先级
    implementation "com.github.gongbox.fss:base:$fss_version"                 //包含 adapter,bind,runpriority 模块,同时还有 Activity 和 Fragment 的基类
    implementation "com.github.gongbox.fss:router-api:$fss_version"           //路由
    annotationProcessor "com.github.gongbox.fss:router-compiler:$fss_version" //路由注解处理器

如果开启混淆,请加入混淆规则

#adapter
-keep  class * extends com.fss.adapter.*.viewholder.BaseViewHolder{
    <init>(android.view.View);
    <init>(***,android.view.View);
}
#runpriority
-keepclassmembers class * {
    @com.fss.runpriority.annotation.RunPriority *(...);
    #runpriority 要调用的方法
    *** initView(...);
    *** initData(...);
    *** initListener(...);
}
#bind
-keepclassmembers class * {
    @com.fss.bind.annotation.BindExtra *;
    @com.fss.bind.annotation.BindOnClick *(...);
    android*.databinding.ViewDataBinding *;
}
#router
-keep class com.fss.router.** { *; }

使用demo

详细介绍:

如果各位觉得有什么不足,欢迎反馈,如果觉得还不错,请给颗星。

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools