diff --git a/app/src/main/java/com/example/citrusclient/views/MyBookshelfAdapter.java b/app/src/main/java/com/example/citrusclient/views/MyBookshelfAdapter.java deleted file mode 100644 index 145a274..0000000 --- a/app/src/main/java/com/example/citrusclient/views/MyBookshelfAdapter.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.example.citrusclient.views; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import com.example.citrusclient.R; - -import java.util.List; - -public class MyBookshelfAdapter extends RecyclerView.Adapter{ - - private List bookList; - - MyBookshelfAdapter(List book){ - this.bookList = book; - } - - @NonNull - @Override - public MyBookViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.a_book, parent, false); - return new MyBookViewHolder(view); - } - - @Override - public void onBindViewHolder(@NonNull MyBookViewHolder holder, int position) { - MyBookshelfFragment.RowBook bookData = this.bookList.get(position); - holder.bookButton.setText(bookData.hogeTitle); - holder.bookButton.setBackgroundColor(bookData.color); - } - - @Override - public int getItemCount() { - return bookList.size(); - } - - static class MyBookViewHolder extends RecyclerView.ViewHolder{ - Button bookButton; - public MyBookViewHolder(@NonNull View itemView) { - super(itemView); - bookButton = itemView.findViewById(R.id.book_button); - } - } - -}