You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project shows how to build an android application with kotlin and some useful libraries. It intergates the [Meepo](https://github.com/nekocode/Meepo) library to create activity & broadcast routers. And use kotlin language sugars to make their usages simpler. For example:
4
+
5
+
```kotlin
6
+
// Goto a new activity
7
+
activityRouter().gotoXxxActivity(this)
8
+
9
+
// Broadcast a action
10
+
broadcastRouter().tellSomeSth(this)
11
+
12
+
// Receiver a broadcast
13
+
registerLocalReceiver({ _, intent ->
14
+
val action = (intent ?:return@registerLocalReceiver).action
15
+
?:return@registerLocalReceiver
16
+
when (action) {
17
+
"ACTION_XXX"-> {
18
+
// Do sth
19
+
}
20
+
}
21
+
}, "ACTION_XXX", "ACTION_XXX2")
22
+
```
23
+
24
+
It intergates the [Retrofit](https://github.com/square/retrofit) library to help making http requests:
25
+
26
+
```kotlin
27
+
gankIoService().picApi.getMeiziPics(1, 0)
28
+
// ...
29
+
```
30
+
31
+
And it splits the backend logic (file and network operations that not relate to ui) into a submodule. And make them easier to test:
0 commit comments