From 7bcc4dbbada2535fd0df38feca680ec3616b8dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Sun, 10 Dec 2023 17:43:06 +0900 Subject: [PATCH] =?UTF-8?q?DI=E3=83=86=E3=82=B9=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/one/nem/lacerta/MainActivity.java | 9 +++++++++ .../one/nem/lacerta/feature/debug/DebugMenuFragment.java | 2 ++ 2 files changed, 11 insertions(+) diff --git a/app/src/main/java/one/nem/lacerta/MainActivity.java b/app/src/main/java/one/nem/lacerta/MainActivity.java index cad41ab5..7250a192 100644 --- a/app/src/main/java/one/nem/lacerta/MainActivity.java +++ b/app/src/main/java/one/nem/lacerta/MainActivity.java @@ -7,14 +7,21 @@ import androidx.navigation.fragment.NavHostFragment; import androidx.navigation.ui.NavigationUI; import android.os.Bundle; +import android.widget.Toast; import com.google.android.material.bottomnavigation.BottomNavigationView; +import one.nem.lacerta.data.repository.TestData; + import dagger.hilt.android.AndroidEntryPoint; +import javax.inject.Inject; @AndroidEntryPoint public class MainActivity extends AppCompatActivity { + @Inject + TestData testData; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -28,5 +35,7 @@ public class MainActivity extends AppCompatActivity { BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav); NavigationUI.setupWithNavController(bottomNavigationView, navController); + + Toast.makeText(this, testData.getTestData(), Toast.LENGTH_SHORT).show(); } } \ No newline at end of file diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuFragment.java index 1b2af58b..108a8310 100644 --- a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuFragment.java +++ b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuFragment.java @@ -10,6 +10,7 @@ import android.view.ViewGroup; import android.widget.Button; import android.widget.Toast; +import dagger.hilt.android.AndroidEntryPoint; import one.nem.lacerta.data.repository.TestData; import javax.inject.Inject; @@ -19,6 +20,7 @@ import javax.inject.Inject; * Use the {@link DebugMenuFragment#newInstance} factory method to * create an instance of this fragment. */ + public class DebugMenuFragment extends Fragment { @Inject