This commit is contained in:
r-ca 2023-12-16 17:01:34 +09:00
parent 86b9e3ff3e
commit 80e9274cf6
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 38 additions and 19 deletions

View File

@ -9,6 +9,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Toast; import android.widget.Toast;
import android.widget.Toolbar;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@ -69,6 +70,11 @@ public class DebugMenuFragment extends Fragment {
public void onViewCreated(View view, Bundle savedInstanceState) { public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
// Toolbarの設定
// TODO-rca: Toolbarの設定を共通化する
Toolbar toolbar = view.findViewById(R.id.toolbar);
toolbar.setTitle("DebugMenu");
view.findViewById(R.id.btn_debug_menu_scan).setOnClickListener( v -> { view.findViewById(R.id.btn_debug_menu_scan).setOnClickListener( v -> {
// スキャン機能呼び出し // スキャン機能呼び出し
Toast.makeText(getContext(), "testMessage", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "testMessage", Toast.LENGTH_SHORT).show();

View File

@ -1,45 +1,58 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
tools:context=".DebugMenuFragment"> tools:context=".DebugMenuFragment">
<com.google.android.material.textview.MaterialTextView <androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Debug Menu" android:tooltipText="Debug menu"
android:textSize="36sp" app:layout_constraintEnd_toEndOf="parent"
android:padding="16dp" /> 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 <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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_toBottomOf="@id/toolbar">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" > android:orientation="vertical">
<!-- Call Events --> <!-- Call Events -->
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="8dp"
android:text="Call Debug Events" android:text="Call Debug Events"
android:textSize="24sp" android:textSize="24sp" />
android:padding="8dp" /> <!-- android:textColor="@color/material_dynamic_primary10" />-->
<!-- android:textColor="@color/material_dynamic_primary10" />-->
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_scan" android:id="@+id/btn_debug_menu_scan"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Start scan action"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="8dp" /> android:text="Start scan action" />
<!-- Padding --> <!-- Padding -->
@ -53,25 +66,25 @@
android:padding="8dp" android:padding="8dp"
android:text="SharedPref" android:text="SharedPref"
android:textSize="24sp" /> android:textSize="24sp" />
<!-- android:textColor="@color/material_dynamic_primary10" />--> <!-- android:textColor="@color/material_dynamic_primary10" />-->
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_clear_pref" android:id="@+id/btn_debug_menu_clear_pref"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Clear Preferences"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="8dp" /> android:text="Clear Preferences" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_shared_pref_editor" android:id="@+id/btn_debug_menu_shared_pref_editor"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Shared Preferences Editor"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginTop="8dp" /> android:text="Shared Preferences Editor" />
<!-- Padding --> <!-- Padding -->
@ -190,4 +203,4 @@
</ScrollView> </ScrollView>
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>