mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
DIテスト
This commit is contained in:
parent
7e2f97d900
commit
7bcc4dbbad
|
@ -7,14 +7,21 @@ import androidx.navigation.fragment.NavHostFragment;
|
||||||
import androidx.navigation.ui.NavigationUI;
|
import androidx.navigation.ui.NavigationUI;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
|
import one.nem.lacerta.data.repository.TestData;
|
||||||
|
|
||||||
import dagger.hilt.android.AndroidEntryPoint;
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
TestData testData;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -28,5 +35,7 @@ public class MainActivity extends AppCompatActivity {
|
||||||
BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav);
|
BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_nav);
|
||||||
|
|
||||||
NavigationUI.setupWithNavController(bottomNavigationView, navController);
|
NavigationUI.setupWithNavController(bottomNavigationView, navController);
|
||||||
|
|
||||||
|
Toast.makeText(this, testData.getTestData(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,6 +10,7 @@ import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
import one.nem.lacerta.data.repository.TestData;
|
import one.nem.lacerta.data.repository.TestData;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
@ -19,6 +20,7 @@ import javax.inject.Inject;
|
||||||
* Use the {@link DebugMenuFragment#newInstance} factory method to
|
* Use the {@link DebugMenuFragment#newInstance} factory method to
|
||||||
* create an instance of this fragment.
|
* create an instance of this fragment.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class DebugMenuFragment extends Fragment {
|
public class DebugMenuFragment extends Fragment {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
Loading…
Reference in New Issue
Block a user