From 4099e233d1f291bf1c50401f7c6b0457f9701687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 11 Dec 2023 15:32:38 +0900 Subject: [PATCH] =?UTF-8?q?Playground=E3=82=92=E3=81=A4=E3=81=8F=E3=81=A3?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../debug/DebugPlayGroundFragment.java | 49 +++++++++++++++++++ .../res/layout/fragment_debug_play_ground.xml | 14 ++++++ 2 files changed, 63 insertions(+) create mode 100644 feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugPlayGroundFragment.java create mode 100644 feature/debug/src/main/res/layout/fragment_debug_play_ground.xml diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugPlayGroundFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugPlayGroundFragment.java new file mode 100644 index 00000000..9ee534ba --- /dev/null +++ b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugPlayGroundFragment.java @@ -0,0 +1,49 @@ +package one.nem.lacerta.feature.debug; + +import android.os.Bundle; + +import androidx.fragment.app.Fragment; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link DebugPlayGroundFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class DebugPlayGroundFragment extends Fragment { + + public DebugPlayGroundFragment() { + // Required empty public constructor + } + + public static DebugPlayGroundFragment newInstance() { + DebugPlayGroundFragment fragment = new DebugPlayGroundFragment(); + Bundle args = new Bundle(); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + return inflater.inflate(R.layout.fragment_debug_play_ground, container, false); + } + + @Override + public void onViewCreated(View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + // ここがいままでのonCreateと同等のものです。 + // findViewById(R.id.hoge)とかは view.findViewById(R.id.hoge) と書き換える必要アリ + // (viewは引数として受け取ってるviewなので、別メソッドに切り出したりするなら渡してあげる) + } +} \ No newline at end of file diff --git a/feature/debug/src/main/res/layout/fragment_debug_play_ground.xml b/feature/debug/src/main/res/layout/fragment_debug_play_ground.xml new file mode 100644 index 00000000..7e710ee1 --- /dev/null +++ b/feature/debug/src/main/res/layout/fragment_debug_play_ground.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file