看这个BLOG,解决holder.itemView.getLayoutParams() 得到的LayoutParams为Null
http://blog.csdn.net/lmj623565791/article/details/45059587
http://blog.csdn.net/lmj623565791/article/details/45059587
2015-10-07
10:57 处
public MyViewHolder onCreateViewHolder(ViewGroup arg0, int i) {
View view = mInflater.inflate(R.layout.item_cell,arg0,false);
MyViewHolder viewHolder = new MyViewHolder(arg0);//应改为 MyViewHolder viewHolder = new MyViewHolder(view);
return viewHolder;
}
public MyViewHolder onCreateViewHolder(ViewGroup arg0, int i) {
View view = mInflater.inflate(R.layout.item_cell,arg0,false);
MyViewHolder viewHolder = new MyViewHolder(arg0);//应改为 MyViewHolder viewHolder = new MyViewHolder(view);
return viewHolder;
}
2015-09-25
10:57 处
public MyViewHolder onCreateViewHolder(ViewGroup arg0, int i) {
View view = mInflater.inflate(R.layout.item_cell,arg0,false);
MyViewHolder viewHolder = new MyViewHolder(arg0);//应改为 MyViewHolder viewHolder = new MyViewHolder(view);
return viewHolder;
}
public MyViewHolder onCreateViewHolder(ViewGroup arg0, int i) {
View view = mInflater.inflate(R.layout.item_cell,arg0,false);
MyViewHolder viewHolder = new MyViewHolder(arg0);//应改为 MyViewHolder viewHolder = new MyViewHolder(view);
return viewHolder;
}
2015-09-25