0
我想添加一堆视图到我的LinearLayout。循环浏览视图不会产生正确的结果
for (Business b : businesses) {
View view = getLayoutInflater().inflate(R.layout.card_item, mLinearLayout, true);
ImageView mImageView = (ImageView) view.findViewById(R.id.image);
Picasso.with(getBaseContext())
.load(b.getPhotoUrl())
.into(mImageView);
TextView mTextView = (TextView) view.findViewById(R.id.title);
mTextView.setText(b.getName());
}
但是,它显示1卡与信息。然后是19个空白视图。