时,我有一个应用程序从JSON获取数据并显示在回收视图 ,当单击各个回收视图它会打开一个新的活动,以显示全部内容。所有我想知道的是如何显示进度对话框befrore第二项活动显示的感谢。 这里是我的代码如何设置进度条回收视图点击
public CustomViewHolder(View view, Context ctx, ArrayList<FeedItem> feeditem) {
super(view);
view.setOnClickListener(this);
this.ctx = ctx;
this.feeditem = feeditem;
this.imageView = (ImageView) view.findViewById(R.id.thumbnail);
this.textView2 = (TextView) view.findViewById(R.id.date);
this.textView3 = (TextView) view.findViewById(R.id.excerpt);
this.categories = (TextView) view.findViewById(R.id.categories);
this.textView = (TextView) view.findViewById(R.id.title);
}
@Override
public void onClick(View v) {
int position = getAdapterPosition();
FeedItem feeditem = this.feeditem.get(position);
Intent intent = new Intent(this.ctx, ScrollingActivity.class);
intent.putExtra("excerpt",feeditem.getExcerpt());
intent.putExtra("content",feeditem.getContent());
intent.putExtra("title",feeditem.getTitle());
Html.fromHtml(String.valueOf(intent.putExtra("content",feeditem.getContent()))).toString();
intent.putExtra("thumbnail",feeditem.getAttachmentUrl());
this.ctx.startActivity(intent);
}
在显示其他活动之前是否有延迟?为什么你想要显示进度对话框? –
是有延迟;图像需要时间,所以因此我希望进度对话框显示为图像渲染@AbhishekJain –