title: add multiple textview in listview in android
body: <p>This is my adapter class i m beginer in android and i want to add multiple textview in listview using view holder and also a button should be there</p>
  
  <pre><code>   package com.example.navigationdrawerexample;
  
      /**
       * Created by Dev2 on 12/7/2015.
       */
  
  import java.util.ArrayList;
  
  import android.content.Context;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.view.ViewGroup;
  import android.widget.ArrayAdapter;
  import android.widget.Button;
  import android.widget.TextView;
  
  public class listadapterfdgdfg extends ArrayAdapter&lt;String&gt; {
      customButtonListener customListner;
  
      public interface customButtonListener {
          public void onButtonClickListner(int position,String value);
      }
  
      public void setCustomButtonListner(customButtonListener listener)
      {
          this.customListner = listener;
      }
  
      private Context context;
  
      private ArrayList&lt;String&gt; data = new ArrayList&lt;String&gt;();
      private ArrayList&lt;String&gt; Price = new ArrayList&lt;String&gt;();
  
      public listadapterfdgdfg(Context context, ArrayList&lt;String&gt; dataItem,ArrayList&lt;String&gt; price) {
          super(context, R.layout.child_row,dataItem);
          this.data = dataItem;
          this.Price=price;
          this.context = context;
      }
  
      @Override
      public View getView(final int position, View convertView, ViewGroup parent) {
          ViewHolder viewHolder;
          ViewHolder viewHolder2;
          if (convertView == null) {
              LayoutInflater inflater = LayoutInflater.from(context);
              convertView = inflater.inflate(R.layout.child_row, null);
              viewHolder = new ViewHolder();
              viewHolder2 = new ViewHolder();
              viewHolder.text = (TextView) convertView.findViewById(R.id.childTextView);
              viewHolder.prices =(TextView)convertView.findViewById(R.id.pricemine);
  
              //viewHolder2.prices= (TextView)convertView.findViewById(R.id.pricemine);
              viewHolder.button = (Button) convertView.findViewById(R.id.childButton);
              convertView.setTag(viewHolder);
          } else {
              viewHolder = (ViewHolder) convertView.getTag();
              viewHolder2 = (ViewHolder) convertView.getTag();
          }
          final String temp = getItem(position);
  
          viewHolder.text.setText(temp);
  
          final String temp1 =getItem(position);
  
          viewHolder.prices.setText(temp1);
  
          viewHolder.button.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  if (customListner != null) {
                      customListner.onButtonClickListner(position,temp);
                  }
              }
          });
  
          return convertView;
      }
  
      public class ViewHolder {
          TextView text;
          TextView prices;
          Button button;
      }
  }
  </code></pre>
  
  <p>here I call this class in that way</p>
  
  <p>I add textview of price in xml also add price array list in constructor of listadapter it shows data of dataitems in screeen 
   it shows same item name as price i know the problem but dont know how to tackle this 
  the problem is here</p>
  
  <pre><code>public listadapterfdgdfg(Context context, ArrayList&lt;String&gt;   dataItem,ArrayList&lt;String&gt; price) {
          super(context, R.layout.child_row,dataItem);
          this.data = dataItem;
          this.Price=price;
          this.context = context;
      }
  </code></pre>
  
  <p>It show price as if i declare price data it show itmename as if I declare itemlis data</p>
  
  <p><a href="https://i.stack.imgur.com/Z8SyN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z8SyN.png" alt="enter image description here"></a></p>
  
  <p>wan to add price of items </p>