I have an app which gets data from json and displays it on recycler view
and when each recycler view is clicked it opens a new activity to show full content. all i want to know is how to show a progress dialog befrore the second activity shows thanks.
Here is my code
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);
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…