title: how to set the specific row item option(visible, invisible) in listview in android
body: <p>frist my english skill weak. </p>
  
  <p>description>    </p>
  
  <p>this is list view.  </p>
  
  <p>ㅡㅡㅡㅡㅡㅡㅡㅡ<br>
  ㅣㅡㅡㅡㅡㅡㅣㅢ &lt;-- this is button  , i init set invisible<br>
  ㅣㅡㅡㅡㅡㅡㅣㅢ<br>
  ㅣㅡㅡㅡㅡㅡㅣㅢ<br>
  ㅣㅡㅡㅡㅡㅡㅣㅢ<br>
  ㅣㅡㅡㅡㅡㅡ ////// &lt;-- i want make visible button<br>
  ㅣㅡㅡㅡㅡㅡ ////// &lt;-- specific position</p>
  
  <p>I make the custom <code>ListView</code>  </p>
  
  <p><code>ListView</code> row contains texts, <code>Button</code>.  </p>
  
  <p>The <code>Button</code> is set invisible option in xml file.</p>
  
  <p>then, I want set the visible specific row button.  </p>
  
  <p>I tried that and failed</p>
  
  <p>after make <code>ArrayList</code> for <code>ListView</code>, marking matching position like this  </p>
  
  <pre><code>    for(i=0; i&lt;arraylist.size(); i++){        
          int t41=Integer.parseInt(arraylist.get(i).getm());
          if(month == t41){
              confirm_replay[i]=true;
              temp55=i;
          } 
       }
  </code></pre>
  
  <p>I can set the textValue. through <code>adapter.getItem(int position)</code>.
  but i don't know, how to control specific button.<br>
  also try add button into adapter. failed..
  also search question in google but my eng skill bad. failed</p>
  
  <p>add my code.</p>
  
  <blockquote>
    <p>main.xml</p>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  &lt;TextView
      android:paddingTop="10dp"
      android:text="match day(weekend)"
      android:textSize="28dp"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" /&gt;
  &lt;LinearLayout
      android:background="#2d000000"
      android:layout_width="match_parent"
      android:layout_height="3dp"&gt;
  &lt;/LinearLayout&gt;
  &lt;ListView
      android:id="@+id/listView"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  </code></pre>
  
  <p>
  </p>
  
  <blockquote>
    <p>list.xml</p>
  </blockquote>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal"&gt;
          &lt;TextView
              android:id="@+id/m"
              android:textSize="20dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
          &lt;TextView
              android:paddingLeft="10dp"
              android:id="@+id/d"
              android:textSize="20dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
          &lt;TextView
              android:id="@+id/yoil"
              android:textSize="20dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
          &lt;TextView
              android:id="@+id/time"
              android:textSize="15dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
      &lt;/LinearLayout&gt;
     &lt;LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"&gt;
         &lt;TextView
             android:id="@+id/vsTeam"
             android:textSize="15dp"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content" /&gt;
         &lt;TextView
             android:id="@+id/league"
             android:paddingLeft="10dp"
             android:textSize="15dp"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content" /&gt;
         &lt;TextView
             android:id="@+id/공갈"
             android:layout_weight="1"
             android:layout_width="0dp"
             android:layout_height="wrap_content" /&gt;
         &lt;Button
             android:id="@+id/button_youtube"
             android:text="다시보기"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:visibility="invisible"/&gt;
     &lt;/LinearLayout&gt;
  
  
  &lt;/LinearLayout&gt;
  
  
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal"&gt;
          &lt;TextView
              android:id="@+id/m"
              android:textSize="20dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
          &lt;TextView
              android:paddingLeft="10dp"
              android:id="@+id/d"
              android:textSize="20dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
          &lt;TextView
              android:id="@+id/yoil"
              android:textSize="20dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
          &lt;TextView
              android:id="@+id/time"
              android:textSize="15dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
      &lt;/LinearLayout&gt;
     &lt;LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"&gt;
         &lt;TextView
             android:id="@+id/vsTeam"
             android:textSize="15dp"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content" /&gt;
         &lt;TextView
             android:id="@+id/league"
             android:paddingLeft="10dp"
             android:textSize="15dp"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content" /&gt;
         &lt;TextView
             android:id="@+id/공갈"
             android:layout_weight="1"
             android:layout_width="0dp"
             android:layout_height="wrap_content" /&gt;
         &lt;Button
             android:id="@+id/button_youtube"
             android:text="다시보기"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:visibility="invisible"/&gt;
     &lt;/LinearLayout&gt;
  
  
  &lt;/LinearLayout&gt;
  &lt;/b&gt;
  </code></pre>
  
  <blockquote>
    <p>adapter</p>
  </blockquote>
  
  <pre><code>    class MlistViewAdapter extends BaseAdapter {
      // Declare Variables
      Context mContext;
      LayoutInflater inflater;
      private List&lt;MatchInfomation&gt; matchinformationlist = null;
      private ArrayList&lt;MatchInfomation&gt; arraylist;
  
      public MlistViewAdapter(Context context,
                             List&lt;MatchInfomation&gt; matchinformationlist) {
          mContext = context;
          this.matchinformationlist = matchinformationlist;
          inflater = LayoutInflater.from(mContext);
          this.arraylist = new ArrayList&lt;MatchInfomation&gt;();
          this.arraylist.addAll(matchinformationlist);
      }
  
      public class ViewHolder {
          TextView m;
          TextView d;
          TextView yoil;
          TextView vsTeam;
          TextView time;
          TextView league;
      }
  
      @Override
      public int getCount() {
          return matchinformationlist.size();
      }
  
      @Override
      public MatchInfomation getItem(int position) {
          return matchinformationlist.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }
  
  
  
      public View getView(final int position, View view, ViewGroup parent) {
          final ViewHolder holder;
  
          if (view == null) {
              holder = new ViewHolder();
              view = inflater.inflate(R.layout.activity_match_list, null);
  
  
              button_youtube.setOnClickListener(new View.OnClickListener() { 
                  @Override
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
                      Intent intent = new Intent(Intent.ACTION_SEARCH);
                      intent.setPackage("com.google.android.youtube");
                      intent.putExtra("query", "Android");
                      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                      mContext.startActivity(intent);
                  }
              });
              // Locate the TextViews in listview_item.xml
              holder.m = (TextView) view.findViewById(R.id.m);
              holder.d = (TextView) view.findViewById(R.id.d);
              holder.yoil = (TextView) view.findViewById(R.id.yoil);
              holder.vsTeam = (TextView) view.findViewById(R.id.vsTeam);
              holder.time = (TextView) view.findViewById(R.id.time);
              holder.league = (TextView) view.findViewById(R.id.league);
              view.setTag(holder);
  
  
          } else {
              holder = (ViewHolder) view.getTag();
          }
          // Set the results into TextViews
          holder.m.setText(matchinformationlist.get(position).getm());
          holder.d.setText(matchinformationlist.get(position).getd());
          holder.yoil.setText(matchinformationlist.get(position).getyoil());
          holder.vsTeam.setText(matchinformationlist.get(position).getvsTeam());
          holder.time.setText(matchinformationlist.get(position).gettime());
          holder.league.setText(matchinformationlist.get(position).getleague());
  
          return view;
      }
  }
  </code></pre>