update cli template
This commit is contained in:
parent
80b9565f96
commit
bcd1dd8844
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/root"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<pub.doric.navbar.BaseDoricNavBar
|
||||
android:id="@+id/doric_nav_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
Reference in New Issue
Block a user