• Stars
    star
    135
  • Rank 268,353 (Top 6 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A powerful componentized framework.一个强大、100% 兼容、支持 AndroidX、支持纯 Kotlin并且灵活的组件化框架

KComponentComponent 升级而来. 全面升级为纯 Kotlin 项目

KComponent 是一个组件化框架. 它提供了两大核心:路由 和 服务发现 和其他框架这里就不比较了. 用过以前的 Component 的朋友是清楚的.

查看文档请点我

KComponent

使用

依赖配置

手动加载 反射 或者 自动加载 ASM 字节码

路由

@RouterAnno(
    hostAndPath = "user/login",
)
class LoginAct: AppCompatActivity {
  
  @AttrValueAutowiredAnno
  late init name: String
  
  @AttrValueAutowiredAnno("password")
  var password1: String? = null
  
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    Component.inject(target = this)
    // xxxxxx
  }
  
}
Router
.with(context)
.hostAndPath("user/login")
.putString("name", "xiaojinzi")
.putString("password", "123456")
.forword()

更多的用法和更详细的解释请查看文档:路由跳转路由标记 @RouterAnno 的使用

服务发现

interface UserSpi {
  fun login(name: String, password: String)
}

@ServiceAnno(UserSpi::class)
class UserSpiImpl : UserSpi {
  fun login(name: String, password: String) {
    // xxxx
  }
}
UserSpi::class.service()?.login(name = "xiaojinzi", password = "xxxxxx")

更多的用法和更详细的解释请查看文档:服务发现的使用服务的装饰增强

扫码进群

微信群的话, 需要先添加微信 xiaojinzi_wx 或者直接扫码. 并且备注:github 我看到了会拉你进群

8. 如果你觉得项目不错, 就请我喝杯咖啡吧! 一块钱也是爱!

9. License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

Component

A powerful componentized framework.一个强大、100% 兼容、支持 AndroidX、支持 Kotlin并且灵活的组件化框架. 大家尽量用 纯 Kotlin 的 KComponent 呀!!!
Java
2,868
star
2

TallyApp

不再维护!!! 一个 Android 的记账 App, 完全的 组件化 + Compose + Kotlin + 响应式编程 + Room 数据库 + Retrofit
Kotlin
308
star
3

RouterGoPlugin

这个辅助插件不在维护!!!!!!!!!!!!!!!!!!!!!!!!
Java
20
star
4

AndroidSupport

init commit
Kotlin
15
star
5

IKnowAndroid

MVVM, RxJava, Component
Java
14
star
6

widget

common widget for Android
Java
9
star
7

android-demos

csdn博客中一些Demo案例放在这里
Java
8
star
8

AndroidModule

Android 通用的 Module
Kotlin
4
star
9

AndroidReactive

这是一个开源的 Android 响应式的架构项目
Kotlin
4
star
10

bitmapFilterLib

first push
C
3
star
11

AndroidAspectj

init
Kotlin
3
star
12

xiaojinzi-openSource-viewAnnotation

Java
2
star
13

codeTemplate

Kotlin
2
star
14

ActivityResultHelper

This is a tools lib for getting ActivityResult more convenience
Java
2
star
15

mmtdAndroid

Kotlin
1
star
16

SpringCloudRabbitMQDemo4

RabbitMQ 的 topic 模式练习.
Java
1
star
17

RxJava

this is an Android App to show and explain RxJava
Java
1
star
18

EHiBase

init
Java
1
star
19

KtUtils

Kotlin
1
star
20

xiaojinzi-openSource-project

Java
1
star
21

xdialog

Java
1
star
22

AnnotationProcessorDemo

Android AnnotationProcessor 的范例
Java
1
star
23

xSingleTouchView

init commit
Java
1
star
24

xImageSelector

图片选择器
Java
1
star
25

LeetCodePractice

算法练习
Kotlin
1
star
26

xiaojinzi-openSource-base

Java
1
star
27

Autowire

一个 Android 的属性自动注入框架, 是组件化框架 https://github.com/xiaojinzi123/Component 中的一个功能, 现抽取出来, 方便只想用此功能的用户去使用
Java
1
star