title: Android : ListView onClick event in the tabs
body: <p>I'm just a newbie in Android world.
  I tried to add a ListView inside a tab (or actually in activity),
  and each listview will be displaying another view that contains component such text, image and etc.
  this components is got to be dynamic, will be set within the source program</p>
  
  <p>listview layout :</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="horizontal" android:layout_width="fill_parent"
  android:layout_height="fill_parent"&gt;
  &lt;LinearLayout android:layout_width="80dip"
      android:layout_height="?android:attr/listPreferredItemHeight" android:gravity="center"&gt;
      &lt;ImageView android:id="@+id/img" android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  &lt;/LinearLayout&gt;
  &lt;LinearLayout android:layout_width="wrap_content"
      android:layout_height="fill_parent" &gt;
      &lt;TextView android:id="@+id/name" android:layout_width="fill_parent"
          android:layout_height="?android:attr/listPreferredItemHeight" android:textSize="18dip"
          android:paddingLeft="10dip" android:gravity="center_vertical" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>onListItemClick :</p>
  
  <pre><code>protected void onListItemClick(ListView l, View v, int position, long id) {
      try {
          // TODO Auto-generated method stub
          super.onListItemClick(l, v, position, id);
          // TODO Auto-generated method stub
          LayoutInflater factory = getLayoutInflater();
          View detailview = factory.inflate(R.layout.top_detail,null);
  
          ImageView detailimg = (ImageView) detailview.findViewById(R.id.img_detail);
          TextView detailtxt = (TextView) detailview.findViewById(R.id.txt_detail);
  
          if (position == SUKIMA) {
              detailimg.setImageResource(R.drawable.sukima);
              detailtxt.setText(R.string.sukima_detail);
          } else if (position == TAJUUJIN) {
              detailimg.setImageResource(R.drawable.pu_tajuujin);
              detailtxt.setText(R.string.tajuujin_detail);
          } else if (position == LOVERS) {
              detailimg.setImageResource(R.drawable.pu_lovers);
              detailtxt.setText(R.string.lovers_detail);
          }
  
          this.flipper.setInAnimation(AnimationSanmon.inFromRightAnimation());
          this.flipper.setOutAnimation(AnimationSanmon.outToLeftAnimation());
          this.flipper.showNext();
  
          detailimg.setImageDrawable(detailview.getResources().getDrawable(R.drawable.sukima));
          detailtxt.setText(R.string.sukima_detail);
  
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>you could see that I'm trying to set image and text using setImageResource and setText, 
  but after I run it, this text and image component didn't updated.</p>
  
  <p>I'll be appreciate to the solution of this problem.</p>
  
  <p>Kind Regards,
  Aru</p>