-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;
}