add debug bottom sheet
This commit is contained in:
28
Android/doric/src/main/java/pub/doric/DevPanel.java
Normal file
28
Android/doric/src/main/java/pub/doric/DevPanel.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package pub.doric;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
|
||||
public class DevPanel extends BottomSheetDialogFragment {
|
||||
|
||||
public DevPanel() {
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(
|
||||
@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState
|
||||
) {
|
||||
return inflater.inflate(R.layout.layout_dev, container, false);
|
||||
}
|
||||
}
|
@@ -67,8 +67,8 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
|
||||
|
||||
|
||||
private void initJSExecutor() {
|
||||
// mDoricJSE = new DoricNativeJSExecutor();
|
||||
mDoricJSE = new DoricRemoteJSExecutor();
|
||||
mDoricJSE = new DoricNativeJSExecutor();
|
||||
// mDoricJSE = new DoricRemoteJSExecutor();
|
||||
mDoricJSE.injectGlobalJSFunction(DoricConstant.INJECT_LOG, new JavaFunction() {
|
||||
@Override
|
||||
public JavaValue exec(JSDecoder[] args) {
|
||||
|
34
Android/doric/src/main/res/layout/layout_dev.xml
Normal file
34
Android/doric/src/main/res/layout/layout_dev.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/menu1_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center"
|
||||
android:text="Debug via Visual Studio Code"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#cccccc" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/menu2_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center"
|
||||
android:text="Enable Hot Reload"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/menu1_text_view" />
|
||||
</LinearLayout>
|
Reference in New Issue
Block a user