来自jsons的图像之间的差距

时间:2015-11-24 05:32:39

标签: java android json android-recyclerview

嗨我有一个问题朋友我正在传递文本和来自Json的图像使用排球库和水平方向的回收者视图一切正常但我在图像之间的差距因为导航抽屉也影响{ {3}}

this the image of the home screen

此适配器具有产品

public class FeaturedAdapter extends RecyclerView.Adapter<ViewHolder> {
ImageLoader imageLoader = AppController.getInstance().getImageLoader();
private Context context;
private List<Data> fpdata;

public FeaturedAdapter(Context context, List<Data> fpdata) {
    this.context = context;
    this.fpdata = fpdata;
}

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View fpds = LayoutInflater.from(parent.getContext()).inflate(R.layout.singlefeatured, parent,false);
    ViewHolder viewHolder = new ViewHolder(fpds);
    return viewHolder;
}

@Override
public void onBindViewHolder(ViewHolder holder, int position) {
    Data feature=fpdata.get(position);

    holder.netfp.setImageUrl(feature.getFpimage(),imageLoader);
    holder.title.setText(feature.getTitle());
    holder.price.setText(feature.getPrice());
}

@Override
public int getItemCount() {
    return fpdata.size();
}
}

0 个答案:

没有答案