diff --git a/doric-cli/target/android/app/src/main/java/pub/doric/example/MainActivity.java b/doric-cli/target/android/app/src/main/java/pub/doric/example/MainActivity.java index 423fb76e..5b4ebd8a 100644 --- a/doric-cli/target/android/app/src/main/java/pub/doric/example/MainActivity.java +++ b/doric-cli/target/android/app/src/main/java/pub/doric/example/MainActivity.java @@ -1,24 +1,17 @@ package pub.doric.example; - import android.os.Bundle; -import androidx.appcompat.app.AppCompatActivity; - -import pub.doric.DoricFragment; +import pub.doric.DoricActivity; public class MainActivity extends AppCompatActivity { private final String BUNDLE_NAME = "__$__"; @Override protected void onCreate(Bundle savedInstanceState) { + String source = "assets://src/" + BUNDLE_NAME + ".js"; + getIntent().putExtra("source", source); + getIntent().putExtra("alias", BUNDLE_NAME); super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - if (savedInstanceState == null) { - String source = "assets://src/" + BUNDLE_NAME + ".js"; - getIntent().putExtra("source", source); - getIntent().putExtra("alias", BUNDLE_NAME); - this.getSupportFragmentManager().beginTransaction().add(R.id.root, new DoricFragment()).commit(); - } } } diff --git a/doric-cli/target/android/app/src/main/res/layout/activity_main.xml b/doric-cli/target/android/app/src/main/res/layout/activity_main.xml index c4576e97..11345c56 100644 --- a/doric-cli/target/android/app/src/main/res/layout/activity_main.xml +++ b/doric-cli/target/android/app/src/main/res/layout/activity_main.xml @@ -1,5 +1,16 @@ - \ No newline at end of file + android:layout_height="match_parent" + android:orientation="vertical"> + + + + + \ No newline at end of file