自動スクロール機能を備えたリスト ビューを実装する必要があります。リスト内の最後に表示された位置まで、そのアクティビティを 2 回目に実行すると、最後に表示された位置まで自動スクロールする必要があります。
Androidで可能ですか?以下の配列アダプターコードでリストを実装しました。
setListAdapter(new QuestionsArrayAdapter(this, SUBJECT, AUTHOR, RESPONCES, DATETIME, NEWPOST, LOGOIMAGE));
QuestionArratAdapter クラスは次のとおりです。
public class QuestionsArrayAdapter extends ArrayAdapter<String> {
public QuestionsArrayAdapter(Context context, String[] questions,
String[] author, String[] responces, String[] dateTime,
String[] newPost, String[] logoImage) {
super(context, R.layout.questionscreen, author);
this.context = context;
this.questions = questions;
this.author = author;
this.responces = responces;
this.dateTime = dateTime;
this.newPost = newPost;
this.logoImage = logoImage;
imageLoader=new ImageLoader(context.getApplicationContext());
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
//System.out.println(s);
//imageView.setImageResource(R.drawable.image_preview);
return rowView;
}