begin render
This commit is contained in:
@@ -2,6 +2,7 @@ package com.github.penfeizhou.doricdemo;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.github.penfeizhou.doric.DoricContext;
|
||||
import com.github.penfeizhou.doric.utils.DoricUtils;
|
||||
@@ -16,5 +17,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
DoricContext doricContext = DoricContext.create(this, DoricUtils.readAssetFile("demo.js"), "demo");
|
||||
doricContext.callEntity("__init__", new JSONBuilder().put("width", 100).put("height", 100));
|
||||
doricContext.callEntity("log");
|
||||
doricContext.getRootNode().setRootView((FrameLayout) findViewById(R.id.root));
|
||||
}
|
||||
}
|
||||
|
@@ -15,4 +15,8 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"></FrameLayout>
|
||||
</android.support.constraint.ConstraintLayout>
|
Reference in New Issue
Block a user