mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +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 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();
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user