From bc55ae929a3bb632c3df316853a6656709c3fad3 Mon Sep 17 00:00:00 2001 From: Niki Date: Tue, 18 Jun 2024 14:52:23 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E7=94=BB=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/debug/DebugTempLoginFragment.java | 39 ++++++++++- .../res/layout/fragment_debug_temp_login.xml | 64 +++++++++++++++++-- 2 files changed, 96 insertions(+), 7 deletions(-) diff --git a/feature/debug/src/main/java/one/nem/kidshift/feature/debug/DebugTempLoginFragment.java b/feature/debug/src/main/java/one/nem/kidshift/feature/debug/DebugTempLoginFragment.java index 7e5ba60..6fd17d8 100644 --- a/feature/debug/src/main/java/one/nem/kidshift/feature/debug/DebugTempLoginFragment.java +++ b/feature/debug/src/main/java/one/nem/kidshift/feature/debug/DebugTempLoginFragment.java @@ -4,17 +4,31 @@ import android.os.Bundle; import androidx.fragment.app.Fragment; +import android.text.Editable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.EditText; +import android.widget.TextClock; +import android.widget.TextView; + +import javax.inject.Inject; + +import dagger.hilt.android.AndroidEntryPoint; +import one.nem.kidshift.utils.KSLogger; /** * A simple {@link Fragment} subclass. * Use the {@link DebugTempLoginFragment#newInstance} factory method to * create an instance of this fragment. */ +@AndroidEntryPoint public class DebugTempLoginFragment extends Fragment { + @Inject + KSLogger logger; + + // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; @@ -59,6 +73,29 @@ public class DebugTempLoginFragment extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment - return inflater.inflate(R.layout.fragment_debug_temp_login, container, false); + View view = inflater.inflate(R.layout.fragment_debug_temp_login, container, false); + + logger.setTag("Login"); + + + //xmlレイアウトからid取得 + EditText id = (EditText) view.findViewById(R.id.idtext); + EditText pass = (EditText) view.findViewById(R.id.pass); + + //ログインボタンを押したときの処理 + view.findViewById(R.id.button).setOnClickListener( + view1 -> { + //入力された値(id,pass)を取得 + Editable getText = id.getText(); + Editable getPass = pass.getText(); + //入力された値(id,pass)をログに表示 + logger.debug(getText.toString()); + logger.debug(getPass.toString()); + } + ); + + + + return view; } } \ No newline at end of file diff --git a/feature/debug/src/main/res/layout/fragment_debug_temp_login.xml b/feature/debug/src/main/res/layout/fragment_debug_temp_login.xml index ffed15f..c62079f 100644 --- a/feature/debug/src/main/res/layout/fragment_debug_temp_login.xml +++ b/feature/debug/src/main/res/layout/fragment_debug_temp_login.xml @@ -1,14 +1,66 @@ - - - \ No newline at end of file + + + + + + + + + +