mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
リファクタ
This commit is contained in:
parent
ab5a8bfa87
commit
8449c8ea87
|
@ -82,15 +82,12 @@ public class HomeTopFragment extends Fragment {
|
||||||
Toolbar toolbar = view.findViewById(R.id.home_toolbar);
|
Toolbar toolbar = view.findViewById(R.id.home_toolbar);
|
||||||
toolbarSetup(toolbar, false, "ホーム");
|
toolbarSetup(toolbar, false, "ホーム");
|
||||||
|
|
||||||
this.listItemAdapter = new ListItemAdapter(new DocumentSelectListener() {
|
this.listItemAdapter = new ListItemAdapter((documentId, documentName) -> {
|
||||||
@Override
|
Intent intent = new Intent(getContext(), ViewerMainActivity.class);
|
||||||
public void onDocumentSelect(String documentId, String documentName) {
|
Log.d("HomeTopFragment", "onDocumentSelect: " + documentId + " " + documentName);
|
||||||
Intent intent = new Intent(getContext(), ViewerMainActivity.class);
|
intent.putExtra("documentId", documentId);
|
||||||
Log.d("HomeTopFragment", "onDocumentSelect: " + documentId + " " + documentName);
|
intent.putExtra("documentName", documentName);
|
||||||
intent.putExtra("documentId", documentId);
|
startActivity(intent);
|
||||||
intent.putExtra("documentName", documentName);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
recyclerView.setAdapter(listItemAdapter);
|
recyclerView.setAdapter(listItemAdapter);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
@ -135,8 +132,6 @@ public class HomeTopFragment extends Fragment {
|
||||||
if (showBackButton) {
|
if (showBackButton) {
|
||||||
toolbar.setNavigationIcon(one.nem.lacerta.shared.ui.R.drawable.arrow_back_24px);
|
toolbar.setNavigationIcon(one.nem.lacerta.shared.ui.R.drawable.arrow_back_24px);
|
||||||
toolbar.setNavigationOnClickListener(v -> {
|
toolbar.setNavigationOnClickListener(v -> {
|
||||||
//this.libraryItemPage = lacertaLibrary.getLibraryPage(this.libraryItemPage.getParentId(), 10).join();
|
|
||||||
// Back
|
|
||||||
Navigation.findNavController(requireView()).popBackStack();
|
Navigation.findNavController(requireView()).popBackStack();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user