Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kio-Eurmy committed Jan 21, 2021
1 parent b0eedb3 commit 46746a5
Show file tree
Hide file tree
Showing 80 changed files with 1,287 additions and 297 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

461 changes: 461 additions & 0 deletions .idea/dbnavigator.xml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .idea/dictionaries/KIO.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

18 changes: 7 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
}

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"

defaultConfig {
applicationId "studio.kio.ruater.demo"
minSdkVersion 16
applicationId "studio.kio.android.routeurdemo"
minSdkVersion 22
targetSdkVersion 29
versionCode 1
versionName "1.0"
Expand All @@ -33,19 +32,16 @@ android {
}
}

kapt{
useBuildCache = false
}

dependencies {
implementation project(":ruater-api")
kapt project(":ruater-processor")
implementation project(":module_a")
implementation project(":module_b")

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
testImplementation 'junit:junit:4.+'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package studio.kio.ruater.ruater.api
package studio.kio.android.routeurdemo

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand All @@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("studio.kio.ruater.ruater.api.test", appContext.packageName)
assertEquals("studio.kio.android.routeurdemo", appContext.packageName)
}
}
14 changes: 5 additions & 9 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="studio.kio.demo">
package="studio.kio.android.routeurdemo">

<application
android:name=".RuaterApplication"
android:allowBackup="false"
android:name=".RouteurApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.RuaterApplication"
tools:ignore="AllowBackup">
<activity android:name="studio.kio.ruater.demo.c.DemoActivity" />
<activity android:name="studio.kio.ruater.demo.b.ListActivity" />
<activity android:name="studio.kio.ruater.demo.a.MainActivity">
android:theme="@style/Theme.RouteurDemo">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
34 changes: 34 additions & 0 deletions app/src/main/java/studio/kio/android/routeurdemo/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package studio.kio.android.routeurdemo

import android.os.Bundle
import android.widget.Button
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import studio.kio.android.common.DemoRoute
import studio.kio.android.common.ListRoute
import studio.kio.android.routeur.api.Routeur

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

var index = 0
findViewById<Button>(R.id.to_list).setOnClickListener {
Routeur.navigateTo(this@MainActivity, ListRoute, index)
.onReturn {
Toast.makeText(
this@MainActivity,
"Back from list $it",
Toast.LENGTH_LONG
).show()
index = it
}
}

findViewById<Button>(R.id.to_demo).setOnClickListener {
Routeur.navigateTo(this@MainActivity, DemoRoute)
}
}

}
17 changes: 17 additions & 0 deletions app/src/main/java/studio/kio/android/routeurdemo/RouteurApp.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package studio.kio.android.routeurdemo

import android.app.Application
import studio.kio.android.routeur.api.Routeur

/**
* created by KIO on 2021/1/20
*/
@Suppress("unused")
class RouteurApp : Application() {

override fun onCreate() {
super.onCreate()
Routeur.init(this)
}

}
14 changes: 0 additions & 14 deletions app/src/main/java/studio/kio/ruater/demo/RuaterApplication.kt

This file was deleted.

49 changes: 0 additions & 49 deletions app/src/main/java/studio/kio/ruater/demo/a/MainActivity.kt

This file was deleted.

14 changes: 0 additions & 14 deletions app/src/main/java/studio/kio/ruater/demo/common/RouteConst.kt

This file was deleted.

This file was deleted.

Loading

0 comments on commit 46746a5

Please sign in to comment.