title: List view showing on another fragment
body: <p>I'm using a view pager with a sliding panel inside, so when my panel is expanded it creates a request of users and instantiates viewholders to show them in the list view, the problem is that they get instantiated on wherever they want, how I can tell in what fragment it should be instantiated.</p>
  
  <p>Here is my <strong>code</strong>:</p>
  
  <pre><code>@Override
  public void onPanelAnchored(View panel) {
      final View cView = panel;
      EndpointInterface Service = ServiceAuthGenerator.createService(EndpointInterface.class);
      currentID = sharedpreferences.getInt("CURRENTID", 0);
      Call&lt;List&lt;Ride&gt;&gt; call = Service.getPassengers(currentRide);
      call.enqueue(new Callback&lt;List&lt;Ride&gt;&gt;() {
  
          @Override
          public void onResponse(Response&lt;List&lt;Ride&gt;&gt; response, Retrofit retrofit) {
              if (response.isSuccess() &amp;&amp; !response.body().isEmpty()) {
                  dialogx.dismiss();
                  ArrayList&lt;String&gt; myUsersName = new ArrayList&lt;&gt;();
                  ArrayList&lt;String&gt; myUsersLastName = new ArrayList&lt;&gt;();
                  ArrayList&lt;String&gt; myUsersMapDirection = new ArrayList&lt;&gt;();
                  ArrayList&lt;Integer&gt; myUsersID = new ArrayList&lt;&gt;();
                  ArrayList&lt;Boolean&gt; myUsersRole = new ArrayList&lt;&gt;();
  
                  for (int i = 0; i &lt; response.body().size(); i++) {
                      myUsersRole.add(response.body().get(i).getRole());
                      myUsersName.add(response.body().get(i).getUser().getFirst_name());
                      myUsersLastName.add(response.body().get(i).getUser().getLast_name());
                      myUsersMapDirection.add(getAdress(new LatLng(response.body().get(i).getOrigin_lat(), response.body().get(i).getOrigin_lng())));
                      myUsersID.add(response.body().get(i).getId());
                      currentName = myUsersName.get(i) + " " + myUsersLastName.get(i);
                      mMap.addMarker(new MarkerOptions().snippet(getAdress(new LatLng(response.body().get(Integer.valueOf(i)).getOrigin_lat(), response.body().get(Integer.valueOf(i)).getOrigin_lng()))).position(new LatLng(response.body().get(Integer.valueOf(i)).getOrigin_lat(), response.body().get(Integer.valueOf(i)).getOrigin_lng())).title(response.body().get(Integer.valueOf(i)).getUser().getFirst_name()).icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_MAGENTA)));
                  }
  
                  ListAdapter userAdapter = new CustomAdapterRequest(MainMenu.this, myUsersName, myUsersLastName, myUsersMapDirection, myUsersID, myUsersRole, currentRide);
                  ListView userListView = (ListView) cView.findViewById(R.id.listViewUserRequest);
                  userListView.setAdapter(userAdapter);
  
              }
  
          }
  
  
          @Override
          public void onFailure(Throwable t) {
              Toast.makeText(getApplicationContext(), "no", Toast.LENGTH_SHORT).show();
          }
      });
  }    
  </code></pre>
  
  <p>Also, here is my <strong>adapter</strong> code:</p>
  
  <pre><code>@Override
  public View getView(final int position, View convertView, ViewGroup parent) {
      View row = convertView;
      myViewHolder holder = null;
  
      if (row == null) {
          LayoutInflater customInflater = (LayoutInflater) contexto.getSystemService(contexto.LAYOUT_INFLATER_SERVICE);
  
          row = customInflater.inflate(R.layout.custom_row_request, parent, false);
          holder = new myViewHolder(row);
          row.setTag(holder);
      } else {
          holder = (myViewHolder) row.getTag();
      }
  
      String singleNameItem = itemName.get(position);
      String singleLastNameItem = itemLastName.get(position);
      String singleDir = itemDirection.get(position);
      Integer singleID = itemIDs.get(position);
      Boolean singleRole = itemRoles.get(position);
  
      holder.tv_name.setText(singleNameItem + " " + singleLastNameItem);
      holder.tv_Direction.setText(singleDir);
      holder.im_profilepic.setImageResource(R.mipmap.profile_photo3);
  
      return row;
  } 
  </code></pre>
  
  <p>And my <strong>holder class</strong>.</p>
  
  <pre><code>class myViewHolder {
      TextView tv_name;
      TextView tv_Direction;
      ImageView im_profilepic;
  
      myViewHolder(View v) {
          tv_name = (TextView) v.findViewById(R.id.nameText);
          tv_Direction = (TextView) v.findViewById(R.id.originText);
          im_profilepic = (ImageView) v.findViewById(R.id.ivImage);
      }
  
  }
  </code></pre>
  
  <p>This is the <strong>Fragment class</strong></p>
  
  <pre><code>public class fragment1 extends Fragment {
  
      public fragment1() {
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
          if (container == null) {
              return null;
          }
          return (CardView) inflater.inflate(R.layout.layout1, container, false);
      }
  
      @Override
      public void onActivityCreated(Bundle savedInstanceState) {
          super.onActivityCreated(savedInstanceState);
      }
  
      public void setTextDestination(String origin, String Destination, Long Date, String estimatedTime, boolean singleRole) {
          TextView tv_Destination = (TextView) getView().findViewById(R.id.TextDestination);
          TextView tv_origin = (TextView) getView().findViewById(R.id.TextOrigin);
          TextView tv_Date = (TextView) getView().findViewById(R.id.textDatePager);
          TextView tv_EstimatedTiem = (TextView) getView().findViewById(R.id.estimatedTimeRoute);
          ImageView iv_roleType = (ImageView) getView().findViewById(R.id.ImgView_roleTypeLayout1);
          tv_Destination.setText(Destination);
          tv_origin.setText(origin);
          iv_roleType.setImageResource(singleRole ? R.mipmap.steerorange3 : R.mipmap.handorange3);
          tv_EstimatedTiem.setText(estimatedTime);
  
          java.util.Date date = new Date(Date * 1000L);
          DateFormat format = new SimpleDateFormat("dd-MM-yyyy    hh:mm a");
          format.setTimeZone(TimeZone.getDefault());
          String formatted = format.format(date);
          tv_Date.setText(formatted);
      }
  }
  </code></pre>
  
  <p>I created a list of fragment1 which is mu fragment class and added it to a list, then depending on how many items on the list I have is the number of instances I get, my set text function works correctly but I don't know how to do that with the list view!
  Thanks! :D</p>