This commit is contained in:
ろむねこ 2023-12-10 22:54:08 +09:00
parent cd537649a0
commit 35a0e68e2d
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168
2 changed files with 75 additions and 13 deletions

View File

@ -80,11 +80,14 @@ 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);
Button button = view.findViewById(R.id.button_di_test); // Button button = view.findViewById(R.id.button_di_test);
// Lambda // // Lambda
button.setOnClickListener(v -> { // button.setOnClickListener(v -> {
Toast.makeText(getContext(), deviceMeta.getDeviceId(), Toast.LENGTH_SHORT).show(); // Toast.makeText(getContext(), deviceMeta.getDeviceMeta().getAndroidApiLevel()
}); // + deviceMeta.getDeviceMeta().getAndroidVersion()
// + deviceMeta.getDeviceMeta().getDeviceManufacturer()
// + deviceMeta.getDeviceMeta().getDeviceModel(), Toast.LENGTH_SHORT).show();
// });
} }
} }

View File

@ -1,22 +1,81 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
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">
<!-- TODO: Update blank fragment layout --> <com.google.android.material.textview.MaterialTextView
<TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="DebugMenu" /> android:text="Debug Menu"
android:textSize="36sp"
android:padding="16dp"
android:textColor="@color/material_dynamic_primary10" />
<Button <ScrollView
android:id="@+id/button_di_test"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:text="DiTest" />
<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:text="Call Debug Events"
android:textSize="24sp"
android:padding="8dp" />
<!-- 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:text="Start scan action"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp" />
<!-- 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:text="Call Debug Events"
android:textSize="24sp"
android:padding="8dp" />
<!-- 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:text="Clear Preferences"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_debug_menu_clear_storage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Clear Storage"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp" />
</LinearLayout>
</ScrollView>
</LinearLayout> </LinearLayout>