ライブラリからドキュメントを開けるように

This commit is contained in:
r-ca 2024-01-23 05:21:48 +09:00
parent 5288855075
commit 1692399b9a
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -1,6 +1,7 @@
package one.nem.lacerta.feature.library; package one.nem.lacerta.feature.library;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -35,6 +36,7 @@ import java.util.Objects;
import javax.inject.Inject; import javax.inject.Inject;
import dagger.hilt.android.AndroidEntryPoint; import dagger.hilt.android.AndroidEntryPoint;
import one.nem.lacerta.component.viewer.ViewerMainActivity;
import one.nem.lacerta.data.Document; import one.nem.lacerta.data.Document;
import one.nem.lacerta.data.LacertaLibrary; import one.nem.lacerta.data.LacertaLibrary;
import one.nem.lacerta.model.FragmentNavigation; import one.nem.lacerta.model.FragmentNavigation;
@ -179,7 +181,11 @@ public class LibraryPageFragment extends Fragment {
@Override @Override
public void onDocumentSelected(String documentId, String documentName) { public void onDocumentSelected(String documentId, String documentName) {
Toast.makeText(getContext(), "Document selected! documentId: " + documentId + ", documentName: " + documentName, Toast.LENGTH_SHORT).show(); Intent intent = new Intent(getContext(), ViewerMainActivity.class);
logger.debug("LibraryTopFragment", "Document selected! documentId: " + documentId + ", documentName: " + documentName);
intent.putExtra("documentId", documentId);
intent.putExtra("documentName", documentName);
startActivity(intent);
} }
}); });