From e1c79e44aefe8bbb8e806ec8d3ea083d747dd0f0 Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 29 Jan 2024 05:05:13 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LacertaFilePickerSelectDocumentAdapter.java | 3 +-- .../LacertaFilePickerSelectDocumentDialog.java | 4 +++- .../main/res/layout/lacerta_dialog_select_doc.xml | 12 ++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 component/common/src/main/res/layout/lacerta_dialog_select_doc.xml diff --git a/component/common/src/main/java/one/nem/lacerta/component/common/picker/LacertaFilePickerSelectDocumentAdapter.java b/component/common/src/main/java/one/nem/lacerta/component/common/picker/LacertaFilePickerSelectDocumentAdapter.java index d76ff719..b0d270af 100644 --- a/component/common/src/main/java/one/nem/lacerta/component/common/picker/LacertaFilePickerSelectDocumentAdapter.java +++ b/component/common/src/main/java/one/nem/lacerta/component/common/picker/LacertaFilePickerSelectDocumentAdapter.java @@ -41,7 +41,7 @@ public class LacertaFilePickerSelectDocumentAdapter extends RecyclerView.Adapter @NonNull @Override public LacertaFilePickerSelectDocumentAdapter.LacertaFilePickerSelectDocumentViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - View view = LayoutInflater.from(parent.getContext()).inflate(one.nem.lacerta.shared.ui.R.layout.common_list_item, null); + View view = LayoutInflater.from(parent.getContext()).inflate(one.nem.lacerta.shared.ui.R.layout.common_list_item, parent, false); return new LacertaFilePickerSelectDocumentViewHolder(view); } @@ -49,7 +49,6 @@ public class LacertaFilePickerSelectDocumentAdapter extends RecyclerView.Adapter public void onBindViewHolder(@NonNull LacertaFilePickerSelectDocumentAdapter.LacertaFilePickerSelectDocumentViewHolder holder, int position) { ListItem listItem = listItems.get(position); holder.title.setText(listItem.getTitle()); - holder.description.setVisibility(View.GONE); holder.icon.setImageResource(listItem.getItemType().getIconId()); holder.itemView.setOnClickListener(v -> listener.onDocumentSelected(listItem.getItemId())); } diff --git a/component/common/src/main/java/one/nem/lacerta/component/common/picker/LacertaFilePickerSelectDocumentDialog.java b/component/common/src/main/java/one/nem/lacerta/component/common/picker/LacertaFilePickerSelectDocumentDialog.java index 1c31db04..ede7e42e 100644 --- a/component/common/src/main/java/one/nem/lacerta/component/common/picker/LacertaFilePickerSelectDocumentDialog.java +++ b/component/common/src/main/java/one/nem/lacerta/component/common/picker/LacertaFilePickerSelectDocumentDialog.java @@ -68,6 +68,9 @@ public class LacertaFilePickerSelectDocumentDialog extends DialogFragment { recyclerView.setAdapter(adapter); recyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); + builder.setTitle("Test"); + + builder.setView(view); lacertaLibrary.getCombinedDocumentToxiList(this.documentId).thenAccept(toxiDocumentModels -> { ArrayList listItems = new ArrayList<>(); @@ -78,7 +81,6 @@ public class LacertaFilePickerSelectDocumentDialog extends DialogFragment { adapter.notifyDataSetChanged(); }); - builder.setView(view); return builder.create(); } diff --git a/component/common/src/main/res/layout/lacerta_dialog_select_doc.xml b/component/common/src/main/res/layout/lacerta_dialog_select_doc.xml new file mode 100644 index 00000000..afd94234 --- /dev/null +++ b/component/common/src/main/res/layout/lacerta_dialog_select_doc.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file