Set the Item layout in the adapter and load each Item data

package nd.no.xww.bottomnavigationlayout; import android.content.Context;import android.media.Image;import android.support.annotation.NonNull;import android.support.v7.widget.RecyclerView;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import android.widget.ImageView;import android.widget.TextView; import com.bumptech.glide.Glide; import java.util.List; import java.util.Map; /**(http://www.amjmh.com/v/BIBRGZ_558768/) * @author xww * @desciption: * @date 2019/7/24 * @time 12:06 */ public class RecyclerLineAdapter extends RecyclerView.Adapter {Context context; List> data; public RecyclerLineAdapter(Context context, List> data) {this.data = data ; this.context = context;} @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recycler_one_view_1_item, viewGro up, false); return new ViewHolder(view);} @Override public void onBindViewHolder(@NonNull ViewHolder holder, int i) {Glide.with(context).load(data.get(i).get(“pic”) ).into(holder.img); holder.name.setText(data.get(i).get(“name”).toString()); holder.desc.setText(data.get(i).get(” desc”).toString());} @Override public int getItemCount() {return data.size();} public class ViewHolder extends RecyclerView.ViewHolder {ImageView img; TextView name; TextView desc; public ViewHolder(@NonNull View itemView ) {super(itemView); img = itemView.findViewById(R.id.img_recy_item_1_pic); name = itemView.findViewById(R.id.tv_recy_item_1_name); desc = itemView.findViewById(R.id.tv_recy_item_1 }_desc); ——————–

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3610 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.