Created
April 17, 2019 01:52
-
-
Save truongsinh/81a09fa430e4d2e242ede779b66745a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git step/03app/src/main/java/pro/truongsinh/flutter/android_flutter_host/MainActivity.kt step/04app/src/main/java/pro/truongsinh/flutter/android_flutter_host/MainActivity.kt | |
index a3f4eea..fbf9de8 100644 | |
--- step/03app/src/main/java/pro/truongsinh/flutter/android_flutter_host/MainActivity.kt | |
+++ step/04app/src/main/java/pro/truongsinh/flutter/android_flutter_host/MainActivity.kt | |
@@ -6,6 +6,7 @@ import android.view.Menu | |
import android.view.MenuItem | |
import kotlinx.android.synthetic.main.activity_main.* | |
+import kotlinx.android.synthetic.main.content_main.* | |
class MainActivity : AppCompatActivity() { | |
@@ -17,10 +18,17 @@ class MainActivity : AppCompatActivity() { | |
fab.setOnClickListener { | |
val flutterEmbeddingActivityIntent = FlutterEmbeddingActivity.createBuilder() | |
- .initialRoute("") | |
+ .initialRoute("counter") | |
.build(this) | |
startActivity(flutterEmbeddingActivityIntent) | |
} | |
+ anotherFlutterRouteButton.setOnClickListener { | |
+ val flutterEmbeddingActivityIntent = FlutterEmbeddingActivity.createBuilder() | |
+ .initialRoute("anotherRoute") | |
+ .build(this) | |
+ startActivity(flutterEmbeddingActivityIntent) | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment