My ListView consist an ImageView and a TextView i need to get the Text from the TextView
<p>My ListView consist an ImageView and a TextView i need to get the Text from the TextView
int the position of my list where i press (onItemClick).</p>

<p>how can i do that?</p>

<p>The 1 class have a Button then when you press i moving to the next activity (CountryView)
and expect to get back from the next activity with a text (name of the selected Country)</p>

<p>the 2 class have a ListView (ImageView And TextView) the data is getting from a database and showing on the ListView </p>

<p>my problem is to get back to the 1 class the selected name of the country</p>

<p>Thanks so much for helping!!!</p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);  
    setContentView(R.layout.home);

   // final int recquestCode = 0;
    final Button btnCountry = (Button) findViewById(R.id.fromButton);
    btnCountry.setOnClickListener(new OnClickListener()
    {

        public void onClick(View v)
        {


            Intent pingIntent = new Intent("CountryView");
            pingIntent.putExtra("btnText", " ");
            pingIntent.setClass(Travel.this, CountryView.class);
            startActivityForResult(pingIntent, RECEIVE_MESSAGE);

         }



    }); 

  /*  Button btnSearch = (Button) findViewById(R.id.searchButton);
    btnSearch.setOnClickListener(new OnClickListener()
    {
        public void onClick(View v)
        {
            Intent intent = new Intent(v.getContext(), ResultView.class);
            startActivityForResult(intent, 0);

        }

    });*/





}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{

    super.onActivityResult(requestCode, resultCode, data);
    if (data.hasExtra("response")){
        Button b = (Button)findViewById(R.id.fromButton);
        CharSequence seq = data.getCharSequenceExtra("response");
        b.setText(seq);
    }





}
</code></pre>

<p>}</p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.country);

    mListUsers = getCountry();
    lvUsers = (ListView) findViewById(R.id.countrylistView);
    lvUsers.setAdapter(new ListAdapter(this, R.id.countrylistView, mListUsers)); 

   // lvUsers.setTextFilterEnabled(true);
   // String extraMsg1 = getIntent().getExtras().getString("extra1");

    lvUsers.setOnItemClickListener(new OnItemClickListener()
    {

        public void onItemClick(AdapterView&lt;?&gt; parent, View view,int position, long id)
        {

          // When clicked, show a toast with the TextView text
            //textItem=view;
 //         Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
       //       Toast.LENGTH_SHORT).show();


            Intent pongIntent = new Intent();
           // lvUsers.getItemAtPosition(position);

            t = (TextView) view;
            Log.v("fffvd"+t, null);
            t.setText(getIntent().getStringExtra("btnText"));
           String strText = t.getText().toString();

            //((TextView) view).getText().toString()

            pongIntent.putExtra("response",strText);
             setResult(Activity.RESULT_OK,pongIntent);
             finish();

            // startActivity(new Intent(CountryView.this,TravelPharmacy.class));


        }
     });



    }
</code></pre>

<p>public ArrayList getCountry(){               </p>

<pre><code>    DBHelper dbAdapter=DBHelper.getDBAdapterInstance(this);
    try {
        dbAdapter.createDataBase();
    } catch (IOException e) {
        Log.i("*** select ",e.getMessage());
    }
    dbAdapter.openDataBase();       
    String query="SELECT * FROM Pays;";
    ArrayList&lt;ArrayList&lt;String&gt;&gt; stringList = dbAdapter.selectRecordsFromDBList(query, null);
    dbAdapter.close();

    ArrayList&lt;Country&gt; countryList = new ArrayList&lt;Country&gt;();
    for (int i = 0; i &lt; stringList.size(); i++) {
        ArrayList&lt;String&gt; list = stringList.get(i);
        Country country = new Country();
        try {
            //country.id = Integer.parseInt(list.get(0));
            country.pays = list.get(1);
        //  country.age = Long.parseLong(list.get(2));
        } catch (Exception e) {
            Log.i("***" + TravelPharmacy.class.toString(), e.getMessage());
        }

        countryList.add(country);
    }
    return countryList;
}

@Override
public void onDestroy()
 {
   //     adapter.imageLoader.stopThread();
   lv.setAdapter(null);
   super.onDestroy();
 }

public OnClickListener listener=new OnClickListener()
{
      @Override
        public void onClick(View arg0)
      {
     //       adapter.imageLoader.clearCache();
           ((BaseAdapter) adapter).notifyDataSetChanged();
      }
};
</code></pre>

<p>public class CountryAdapter extends BaseAdapter {</p>

<pre><code>    private Activity activity;
    private String[] data;
    private  LayoutInflater inflater=null;
   // public ImageLoader imageLoader; 

    public CountryAdapter(Activity a, String[] d)
    {
        activity = a;
        data=d;
        inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    }

    public int getCount() {
        return data.length;
    }

    public Object getItem(int position) {
        return position;
    }

    public long getItemId(int position) {
        return position;
    }

    public  class ViewHolder
    {
        public TextView text;
        public ImageView image;
    }

    public View getView(int position, View convertView, ViewGroup parent) 
    {
        View vi=convertView;
        ViewHolder holder;
        if(convertView==null)
        {
            vi = inflater.inflate(R.layout.singlecountry, null);
            holder=new ViewHolder();
            holder.text=(TextView)vi.findViewById(R.id.text);;
            holder.image=(ImageView)vi.findViewById(R.id.image);
            vi.setTag(holder);
        }
        else
            holder=(ViewHolder)vi.getTag();

        holder.text.setText("item "+data[position]);
        holder.image.setTag(data[position]);
        return vi;
    }
}
</code></pre>

<p>private class ListAdapter extends ArrayAdapter {  // --CloneChangeRequired
    private ArrayList mList;  // --CloneChangeRequired
    private Context mContext;</p>

<pre><code>public ListAdapter(Context context, int textViewResourceId,ArrayList&lt;Country&gt; list) { // --CloneChangeRequired
    super(context, textViewResourceId, list);
    this.mList = list;
    this.mContext = context;
}

public View getView(int position, View convertView, ViewGroup parent)
{
    View view = convertView;
    try{
    if (view == null) {
        LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        view = vi.inflate(R.layout.singlecountry, null);    // --CloneChangeRequired(list_item)
    }
    final Country listItem = mList.get(position);   // --CloneChangeRequired                
    if (listItem != null) {
        // setting singleCountry views                      
    //  ( (TextView) view.findViewById(R.id.tv_id) ).setText( listItem.getId()+"");
        ( (TextView) view.findViewById(R.id.text) ).setText( listItem.getPays() );
        //((ImageView)view.findViewById(R.id.image)).setImageDrawable(drawable.world);
        //( (TextView) view.findViewById(R.id.tv_age) ).setText( listItem.getAge()+"" );

    }}catch(Exception e){
        Log.i(CountryView.ListAdapter.class.toString(), e.getMessage());                
    }
    return view;
}
</code></pre>

<p>}
}</p>
