mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
修正
This commit is contained in:
parent
65b87ef346
commit
e1c79e44ae
|
@ -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()));
|
||||
}
|
||||
|
|
|
@ -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<ListItem> listItems = new ArrayList<>();
|
||||
|
@ -78,7 +81,6 @@ public class LacertaFilePickerSelectDocumentDialog extends DialogFragment {
|
|||
adapter.notifyDataSetChanged();
|
||||
});
|
||||
|
||||
builder.setView(view);
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/document_list_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||
</FrameLayout>
|
Loading…
Reference in New Issue
Block a user