How to get the text from the list?

I have a list created via adaper and file template... how to get and transmit text or image via putEXTRA
Here is the text of the template
<linearlayout android:id="@+id/linearLayout1" android:layout_width="parent" android:layout_height="wrap content">
 <imageview android:id="@+id/imageView1" android:layout_width="90dp" android:layout_height="90dp" android:src="@drawable/saiman" android:clickable="false">
 <linearlayout android:id="@+id/linearLayout2" android:layout_width="parent" android:layout_height="90dp" android:orientation="vertical" android:weightsum="1">

 <textview android:id="@+id/textView1" android:layout_width="wrap content" android:layout_height="wrap content" android:layout_gravity="top|left" android:text="Large Text" android:textappearance="?android:attr/text appearance large">

 <textview android:id="@+id/textView2" android:layout_width="wrap content" android:layout_height="wrap content" android:layout_gravity="right" android:text="textview"></textview></textview></linearlayout></imageview></linearlayout>

Here is the text creating a list
1) advanced adapter
public class ListData{
 String title;//item Name
 int price;//Price of item
 int image;

 ListData(String _title, int _price, int _image){
 title= _title;
 price= _price;
 image= _image;


2) create a list
public View getView(int position, View convertView, ViewGroup parent) {
 ListData p=((ListData) getItem(position));
 View v = inflater.inflate(R. layout.item, parent, false);
 ((TextView) v.findViewById(R. id.textView1)).setText(p.title);
 ((TextView) v.findViewById(R. id.textView2)).setText(p.price+"RUB");
 ((ImageView) v.findViewById(R. id.imageView1)).setImageResource(p.image);
 return v;

Specifically , you need to get the text of R. id.textView1,R. id.textView2 and R. id.imageView1 and pass to another class
July 9th 19 at 13:21
2 answers
July 9th 19 at 13:23
intent1.putExtra("name", ((View) findViewById(42)).getText().toString());
cannot resolve method - coby.Barton commented on July 9th 19 at 13:26
getText - coby.Barton commented on July 9th 19 at 13:29
It worked , thank you - coby.Barton commented on July 9th 19 at 13:32
and how Image get? getImageView not working - coby.Barton commented on July 9th 19 at 13:35
: we need to look at specific methods of a particular class and find what you need - charity84 commented on July 9th 19 at 13:38
July 9th 19 at 13:25
intent1.putExtra("name",getText(R. id.textView1).toString() );
Writes resourse Expected of type string - coby.Barton commented on July 9th 19 at 13:28
: I minimaalset copied part of the code from your post, I should be working code - coby.Barton commented on July 9th 19 at 13:31

Find more questions by tags Android