From a8e15d8e18a4f1f9bc378001ff4bbff4dfe46cfa Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 21 Jan 2024 15:17:43 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=8A=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C=E3=81=99=E3=82=8B=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/feature/home/HomeTopFragment.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java index 1510b2ac..eab1bf05 100644 --- a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java +++ b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java @@ -1,5 +1,6 @@ package one.nem.lacerta.feature.home; +import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; @@ -28,6 +29,7 @@ import java.util.concurrent.CompletableFuture; import javax.inject.Inject; import dagger.hilt.android.AndroidEntryPoint; +import one.nem.lacerta.component.viewer.ViewerMainActivity; import one.nem.lacerta.data.Document; import one.nem.lacerta.data.LacertaLibrary; import one.nem.lacerta.model.ListItem; @@ -78,7 +80,12 @@ public class HomeTopFragment extends Fragment { RecyclerView recyclerView = view.findViewById(R.id.home_item_recycler_view); - ListItemAdapter listItemAdapter = new ListItemAdapter(); + ListItemAdapter listItemAdapter = new ListItemAdapter(documentId -> { + Log.d("HomeTopFragment", "onViewCreated: " + documentId); + Intent intent = new Intent(getContext(), ViewerMainActivity.class); + intent.putExtra("documentId", documentId); + startActivity(intent); + }); recyclerView.setAdapter(listItemAdapter); recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));