gpt4 book ai didi

android - 如何在每个 ListView 项目中显示进度条?

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:32:50 28 4
gpt4 key购买 nike

请帮我在 ListView 项目中显示进度对话框。

public class DealerSubCatListAdapter extends BaseAdapter {
private Context context;
private ArrayList<Image> Image;
private LayoutInflater inflater = null;

public DealerSubCatListAdapter(Context context, ArrayList<Image> Image) {

this.context = context;
this.Image = Image;
inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);


notifyDataSetChanged();

}

@Override
public int getCount() {
return Image.size();
}

@Override
public Object getItem(int position) {
return position;
}

@Override
public long getItemId(int position) {
return position;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = null;
if (convertView == null) {
view = inflater.inflate(R.layout.imagesubcat, null);
} else {
view = convertView;
}

TextView imagesubcat = (TextView) view.findViewById(R.id.imagesubcattv);
// tagLine

imagesubcat.setText(Image.get(position).image_type);

return view;
}

}

所以,这是显示 ListView 项的适配器。

最佳答案

查看 Listview with ProgressBar它可能对你有帮助。

关于android - 如何在每个 ListView 项目中显示进度条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20795862/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com