-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
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) | ||
} | ||
} | ||
|
||
} |
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) | ||
} | ||
|
||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.