From 38a277c15e4c90ddb783ad4498c895e2d81a5226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 25 Jan 2024 11:51:26 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=80=E3=83=97=E3=82=BF=E4=BD=9C?= =?UTF-8?q?=E6=88=90WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shared/ui/SelectDirDialogItemAdapter.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 shared/ui/src/main/java/one/nem/lacerta/shared/ui/SelectDirDialogItemAdapter.java diff --git a/shared/ui/src/main/java/one/nem/lacerta/shared/ui/SelectDirDialogItemAdapter.java b/shared/ui/src/main/java/one/nem/lacerta/shared/ui/SelectDirDialogItemAdapter.java new file mode 100644 index 00000000..661cba5d --- /dev/null +++ b/shared/ui/src/main/java/one/nem/lacerta/shared/ui/SelectDirDialogItemAdapter.java @@ -0,0 +1,44 @@ +package one.nem.lacerta.shared.ui; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +public class SelectDirDialogItemAdapter extends RecyclerView.Adapter { + + @Override + public SelectDirDialogItemAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { + View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.common_list_item, parent, false); + return new SelectDirDialogItemAdapter.ViewHolder(view); + } + + @Override + public void onBindViewHolder(SelectDirDialogItemAdapter.ViewHolder holder, int position) { + holder.title.setText("title"); + holder.description.setText("description"); + } + + @Override + public int getItemCount() { + return 3; + } + + public class ViewHolder extends RecyclerView.ViewHolder { + + TextView title; + TextView description; + + + public ViewHolder(@NonNull View itemView) { + super(itemView); + + title = itemView.findViewById(R.id.item_title); + description = itemView.findViewById(R.id.item_description); + + } + } +}