デバッグメニュー作り直す

This commit is contained in:
r-ca committed 2023-12-17 13:42:47 +09:00
1 parent 92ec3d31f4
commit 137316d95b
16 files changed
+1 -1111

No files matched your search

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DebugMenuContainerActivity">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragmentContainerView"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="409dp"
android:layout_height="729dp"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/feature_debug_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,207 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:theme="@style/Theme.Material3.DayNight.NoActionBar"
tools:context=".DebugMenuFragment">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:elevation="10dp"
tools:title="Debug Menu"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <com.google.android.material.textview.MaterialTextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="Debug Menu"-->
<!-- android:textSize="36sp"-->
<!-- android:padding="16dp" />-->
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Call Events -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Call Debug Events"
android:textSize="24sp" />
<!-- android:textColor="@color/material_dynamic_primary10" />-->
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_scan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="Start scan action" />
<!-- Padding -->
<View
android:layout_width="match_parent"
android:layout_height="16dp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="SharedPref"
android:textSize="24sp" />
<!-- android:textColor="@color/material_dynamic_primary10" />-->
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_clear_pref"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="Clear Preferences" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_shared_pref_editor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="Shared Preferences Editor" />
<!-- Padding -->
<View
android:layout_width="match_parent"
android:layout_height="16dp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="PlayGround"
android:textSize="24sp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_call_play_ground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="Playground" />
<View
android:layout_width="match_parent"
android:layout_height="16dp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="FileDebug"
android:textSize="24sp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_get_external_path"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="Get External Path" />
<View
android:layout_width="match_parent"
android:layout_height="16dp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="File Debug"
android:textSize="24sp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_file_write_test"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="Repository Debugger" />
<View
android:layout_width="match_parent"
android:layout_height="16dp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Repository Debug"
android:textSize="24sp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_go_to_repository_debug"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="Repository Debugger" />
<View
android:layout_width="match_parent"
android:layout_height="16dp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="DatabaseDebug"
android:textSize="24sp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_insert_test_data"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="InsertDebugData" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_select_test_data"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:text="SelectDebugData" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DebugPlayGroundFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</ScrollView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</ScrollView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</ScrollView>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DebugRepositoryDebuggerFragment">
<!-- TODO: Update blank fragment layout -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<EditText
android:id="@+id/editTextRepoId"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:ems="10"
android:inputType="text"
android:text="RepositoryID" />
<Button
android:id="@+id/buttonGenerateRepoId"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Generate" />
</LinearLayout>
<Button
android:id="@+id/buttonGetCreateRepository"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Get/Create Repository" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,121 +0,0 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".DebugSharedPrefEditorFragment">
<RadioGroup
android:id="@+id/radioGroupPrefType"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radioButtonCommon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Common" />
<RadioButton
android:id="@+id/radioButtonUserData"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="UserData" />
</RadioGroup>
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Save pref" />
<LinearLayout
android:id="@+id/SaveLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<EditText
android:id="@+id/saveKeyEditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="2"
android:hint="Key:Value" />
<com.google.android.material.button.MaterialButton
android:id="@+id/saveButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="1"
android:text="Save" />
</LinearLayout>
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Load pref" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/LoadLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<EditText
android:id="@+id/loadKeyEditText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:hint="Key" />
<com.google.android.material.button.MaterialButton
android:id="@+id/loadButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Load" />
</LinearLayout>
<TextView
android:id="@+id/loadValueTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="No value..."
android:textSize="24sp" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/prefItemTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="None" />
</LinearLayout>
</ScrollView>
</LinearLayout>
@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/Theme.Material3.DayNight.NoActionBar">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:elevation="10dp"
tools:title="Document Manage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/doc_editor_menu_recycler_view"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,28 +0,0 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="This is a CardView"
android:padding="16dp"
android:textSize="18sp"
android:textColor="@android:color/black"/>
</androidx.cardview.widget.CardView>
</LinearLayout>
@@ -2,47 +2,6 @@
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/feature_debug_navigation"
app:startDestination="@id/debugMenuFragment">
<fragment
android:id="@+id/debugMenuFragment"
android:name="one.nem.lacerta.feature.debug.DebugMenuFragment"
android:label="fragment_debug_menu"
tools:layout="@layout/fragment_debug_menu" >
<action
android:id="@+id/action_debugMenuFragment_to_debugSharedPrefEditorFragment"
app:destination="@id/debugSharedPrefEditorFragment" />
<action
android:id="@+id/action_debugMenuFragment_to_debugPlayGroundFragment"
app:destination="@id/debugPlayGroundFragment" />
<action
android:id="@+id/action_debugMenuFragment_to_debugRepositoryDebuggerFragment"
app:destination="@id/debugRepositoryDebuggerFragment" />
<action
android:id="@+id/action_debugMenuFragment_to_debugDocumentManageFragment"
app:destination="@id/debugDocumentManageFragment" />
</fragment>
<fragment
android:id="@+id/debugSharedPrefEditorFragment"
android:name="one.nem.lacerta.feature.debug.DebugSharedPrefEditorFragment"
android:label="fragment_debug_shared_pref_editor"
tools:layout="@layout/fragment_debug_shared_pref_editor" />
android:id="@+id/feature_debug_navigation">
<fragment
android:id="@+id/debugPlayGroundFragment"
android:name="one.nem.lacerta.feature.debug.DebugPlayGroundFragment"
android:label="fragment_debug_play_ground"
tools:layout="@layout/fragment_debug_play_ground" />
<fragment
android:id="@+id/debugRepositoryDebuggerFragment"
android:name="one.nem.lacerta.feature.debug.DebugRepositoryDebuggerFragment"
android:label="fragment_debug_repository_debugger"
tools:layout="@layout/fragment_debug_repository_debugger" />
<fragment
android:id="@+id/debugDocumentManageFragment"
android:name="one.nem.lacerta.feature.debug.DocumentManageDebugFragment"
android:label="fragment_debug_document_manage"
tools:layout="@layout/fragment_document_manage_debug" />
</navigation>