title: Adding button to custom ListView Adapter
body: <p>I am using following method to populate a listview inside a fragment class.</p>
  
  <pre><code>private void showEmployee(){
          JSONObject jsonObject = null;
          ArrayList&lt;HashMap&lt;String,String&gt;&gt; list = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
          try {
              jsonObject = new JSONObject(JSON_STRING);
              JSONArray result = jsonObject.getJSONArray(Config.TAG_JSON_ARRAY);
  
              for(int i = 0; i&lt;result.length(); i++){
                  JSONObject jo = result.getJSONObject(i);
                  String cia = jo.getString(Config.TAG_CIA);
                  String fn = jo.getString(Config.TAG_FN);
                  String ln = jo.getString(Config.TAG_LN);
                  String ad1 = jo.getString(Config.TAG_AD1);
                  String ad2 = jo.getString(Config.TAG_AD2);
                  String type = jo.getString(Config.TAG_TYPE);
                  String city = jo.getString(Config.TAG_CITY);
                  String state = jo.getString(Config.TAG_STATE);
                  String zip = jo.getString(Config.TAG_ZIP);
  
                  String phone = jo.getString(Config.TAG_PHONE);
  
                  String ext = jo.getString(Config.TAG_EXT);
  
                  String fromto = jo.getString(Config.TAG_FROMTO);
  
                  Log.d("HOLA ADDRESSES", "FROM O TO: " + fromto);
  
  
                  String user = jo.getString(Config.TAG_USER);
  
  
                  String id_address = jo.getString(Config.TAG_ID_ADDRESS);
  
  
                  HashMap&lt;String,String&gt; employees = new HashMap&lt;&gt;();
                  employees.put(Config.TAG_CIA,cia);
                  employees.put(Config.TAG_LN,fn);
                  employees.put(Config.TAG_FN,ln);
                  employees.put(Config.TAG_AD1,ad1);
                  employees.put(Config.TAG_AD2,ad2);
                  employees.put(Config.TAG_TYPE,type);
                  employees.put(Config.TAG_CITY,city);
                  employees.put(Config.TAG_STATE,state);
                  employees.put(Config.TAG_ZIP,zip);
                  employees.put(Config.TAG_PHONE,phone);
                  employees.put(Config.TAG_EXT,ext);
                  employees.put(Config.TAG_FROMTO,fromto);
                  employees.put(Config.TAG_USER,user);
                  employees.put(Config.TAG_ID_ADDRESS,id_address);
  
  
  
                  list.add(employees);
              }
  
          } catch (JSONException e) {
              e.printStackTrace();
          }
  
          ListAdapter adapter = new SimpleAdapter(
                  getActivity(), list, R.layout.addresses_list_item,
                  new String[]{Config.TAG_CIA,
                          Config.TAG_FN,
                          Config.TAG_LN,
                          Config.TAG_AD1,
                          Config.TAG_AD2,
                          Config.TAG_TYPE,
                          Config.TAG_CITY,
                          Config.TAG_STATE,
                          Config.TAG_ZIP,
                          Config.TAG_PHONE,
                          Config.TAG_EXT,
                          Config.TAG_FROMTO,
                          Config.TAG_USER,
                          Config.TAG_ID_ADDRESS},
                  new int[]{R.id.cia,
                          R.id.fn,
                          R.id.ln,
                          R.id.ad1,
                          R.id.ad2,
                          R.id.type,
                          R.id.city,
                          R.id.state,
                          R.id.zip,
                          R.id.phone,
                          R.id.ext,
                          R.id.fromto,
                          R.id.user,
                          R.id.id_address});
  
          listView.setAdapter(adapter);
      }
  </code></pre>
  
  <p>Now I want to include a button on every row from the list and be able to change the button text on every row depending on the value from one of the items.</p>
  
  <p>I have included the button inside the listview item layout file.</p>
  
  <p>I don´t know where to put the button reference on this method.</p>
  
  <p>Thank you.</p>