パッケージ名のミスを修正, DI実装

This commit is contained in:
r-ca committed 2023-12-10 18:27:14 +09:00
1 parent 15ee6f344f
commit 24332576e2
10 files changed
+24 -18

No files matched your search

-1
View File
@@ -45,7 +45,6 @@ dependencies {
// 内部モジュール
// data
implementation project(':data')
@@ -13,6 +13,9 @@ import android.widget.Toast;
import dagger.hilt.android.AndroidEntryPoint;
import javax.inject.Inject;
import one.nem.lacerta.data.repository.DeviceMeta;
/**
* A simple {@link Fragment} subclass.
* Use the {@link DebugMenuFragment#newInstance} factory method to
@@ -22,6 +25,9 @@ import javax.inject.Inject;
@AndroidEntryPoint
public class DebugMenuFragment extends Fragment {
@Inject
DeviceMeta deviceMeta;
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
@@ -74,11 +80,11 @@ public class DebugMenuFragment extends Fragment {
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// Button button = view.findViewById(R.id.button_di_test);
// // Lambda
// button.setOnClickListener(v -> {
// Toast.makeText(getContext(), testData.getTestData(), Toast.LENGTH_SHORT).show();
// });
Button button = view.findViewById(R.id.button_di_test);
// Lambda
button.setOnClickListener(v -> {
Toast.makeText(getContext(), deviceMeta.getDeviceId(), Toast.LENGTH_SHORT).show();
});
}
}