-3
我试图夸大布局,我碰到这两个code.Can人请告诉我这两种膨胀方法之间的区别? 我是新来的android工作室,我想了解更多关于这种膨胀方法。 除了这两个有没有其他的方式来扩大布局?不同的方式膨胀布局
public MyViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.movie_list_row, parent, false);
return new MyViewHolder(itemView);
}
和
LayoutInflater inflater = LayoutInflater.from(context);
View rowView = inflater.inflate(R.layout.list_single, null, true);
return rowView;
}