画像の配列リストとスクロールビューの下のテキストフィールドを含む水平スクロールビューがあります。水平スクロールビューで画像を変更するときにテキストを変更するにはどうすればよいですか。
For Example: If the image will show image2 the text will also texted with text2 next when i will scroll the image2 to image3 the text will also move from text2 to text3
ここで、画像はスクロールするだけで、テキストビューは修正されたままになり、画像のみで名前が変更されます
私はあらゆる可能性を試しましたが、得られませんでした:
ここでは、画像を配置したビュー項目でアダプター クラスを使用しました。
public View getView(int position, View convertView, ViewGroup parent) {
vi=convertView;
if(convertView==null){
vi = LayoutInflater.from(parent.getContext()).inflate(R.layout.screen, null);
position_pin = position;
Holder.images=(ImageView) vi.findViewById(R.id.image);
Holder.textview=(TextView) vi.findViewById(R.id.name);
Holder.images.setImageResource(imageIds[position]);
Holder.text.setText(name);//here name is String
vi.setTag(Holder);
}
return vi;
}