ログ挿入

This commit is contained in:
ろむねこ 2023-12-11 11:54:02 +09:00
parent 1fa625e948
commit 701bb898c5
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -4,6 +4,7 @@ import android.os.Bundle;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -60,12 +61,14 @@ public class DebugSharedPrefEditorFragment extends Fragment {
view.findViewById(R.id.loadButton).setOnClickListener(v -> { view.findViewById(R.id.loadButton).setOnClickListener(v -> {
String key = loadKeyEditText.getText().toString(); String key = loadKeyEditText.getText().toString();
String value = prefCommon.getStringValue(key); String value = prefCommon.getStringValue(key);
Log.d("loadButton", "key:" + key + " value:" + value);
view.findViewById(R.id.loadValueTextView).setContentDescription(value); view.findViewById(R.id.loadValueTextView).setContentDescription(value);
}); });
view.findViewById(R.id.saveButton).setOnClickListener(v -> { view.findViewById(R.id.saveButton).setOnClickListener(v -> {
String KeyValue = saveKeyEditText.getText().toString(); String KeyValue = saveKeyEditText.getText().toString();
String[] split = KeyValue.split(":", 2); String[] split = KeyValue.split(":", 2);
Log.d("saveButton", "split[0]:" + split[0] + " split[1]:" + split[1]);
prefCommon.setStringValue(split[0], split[1]); prefCommon.setStringValue(split[0], split[1]);
}); });