title: ListView not displaying items(using retrofit to retrieve list)
body: <p>Hello guys I'm still learning android things and this is my first time that I 'm building a list using retrofit to populate it from server. I receive no error, app doesn't crash, and my log show that I receive data from server.</p>
  
  <p><strong>My Adapter for listview:</strong></p>
  
  <pre><code>public class TransactionsAdapter extends BaseAdapter {
  ArrayList&lt;Transactions&gt; transactions;
  public TransactionsAdapter(ArrayList&lt;Transactions&gt; transactions) {
      this.transactions=transactions;
  }
  
  @Override
  public int getCount() {
      return 0;
  }
  
  @Override
  public Object getItem(int position) {
      return null;
  }
  
  @Override
  public long getItemId(int position) {
      return 0;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      View view=null;
      ViewHolder viewHolder = null;
  
      if(convertView == null)
      {
          view = LayoutInflater.from(parent.getContext()).inflate(R.layout.izvjestaji_item,parent,false);
          viewHolder = new ViewHolder(view);
          view.setTag(viewHolder);
  
      }
      else{
          view = convertView;
          viewHolder= (ViewHolder) view.getTag();
  
      }
  
      Transactions transactions = (Transactions) getItem(position);
  
      if(transactions != null) {
          viewHolder.datum.setText(transactions.getPurchaseDate());
          viewHolder.partner.setText(transactions.getMerchantName());
          viewHolder.iznos.setText(transactions.getTransactionMoneyAmount().toString());
          viewHolder.brojbodova.setText(transactions.getSalesAmount().toString());
      }
  
      return view;
  }
  
  
  private class ViewHolder{
      TextView datum;
      TextView partner;
      TextView iznos;
      TextView brojbodova;
  
      public ViewHolder(View view) {
          this.datum = (TextView) view.findViewById(R.id.izvjestaji_datum);
          this.partner = (TextView) view.findViewById(R.id.izvjestaji_partner);
          this.iznos = (TextView) view.findViewById(R.id.izvjestaji_iznos);
          this.brojbodova=(TextView)view.findViewById(R.id.izvjestaji_brojbodova);
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Model that server return generated via jsonschema2pojo.org</strong> </p>
  
  <pre><code>import javax.annotation.Generated;
  
  @Generated("org.jsonschema2pojo")
  public class Transactions {
  
  private Integer Id;
  private String PurchaseDate;
  private Integer Month;
  private Integer Year;
  private Double SalesAmount;
  private Object SpecialSalesActionId;
  private Integer PosTerminalId;
  private Integer CardId;
  private String MerchantName;
  private Integer TransactionPointsAmount;
  private Double TransactionMoneyAmount;
  private Boolean IsDeleted;
  private Boolean IsVoucher;
  private Integer LoyaltyLevel;
  private Integer CategoryId;
  private Object CardNo;
  private Integer MerchantId;
  
  /**
   *
   * @return
   * The Id
   */
  public Integer getId() {
      return Id;
  }
  
  /**
   *
   * @param Id
   * The Id
   */
  public void setId(Integer Id) {
      this.Id = Id;
  }
  
  /**
   *
   * @return
   * The PurchaseDate
   */
  public String getPurchaseDate() {
      return PurchaseDate;
  }
  
  /**
   *
   * @param PurchaseDate
   * The PurchaseDate
   */
  public void setPurchaseDate(String PurchaseDate) {
      this.PurchaseDate = PurchaseDate;
  }
  
  /**
   *
   * @return
   * The Month
   */
  public Integer getMonth() {
      return Month;
  }
  
  /**
   *
   * @param Month
   * The Month
   */
  public void setMonth(Integer Month) {
      this.Month = Month;
  }
  
  /**
   *
   * @return
   * The Year
   */
  public Integer getYear() {
      return Year;
  }
  
  /**
   *
   * @param Year
   * The Year
   */
  public void setYear(Integer Year) {
      this.Year = Year;
  }
  
  /**
   *
   * @return
   * The SalesAmount
   */
  public Double getSalesAmount() {
      return SalesAmount;
  }
  
  /**
   *
   * @param SalesAmount
   * The SalesAmount
   */
  public void setSalesAmount(Double SalesAmount) {
      this.SalesAmount = SalesAmount;
  }
  
  /**
   *
   * @return
   * The SpecialSalesActionId
   */
  public Object getSpecialSalesActionId() {
      return SpecialSalesActionId;
  }
  
  /**
   *
   * @param SpecialSalesActionId
   * The SpecialSalesActionId
   */
  public void setSpecialSalesActionId(Object SpecialSalesActionId) {
      this.SpecialSalesActionId = SpecialSalesActionId;
  }
  
  /**
   *
   * @return
   * The PosTerminalId
   */
  public Integer getPosTerminalId() {
      return PosTerminalId;
  }
  
  /**
   *
   * @param PosTerminalId
   * The PosTerminalId
   */
  public void setPosTerminalId(Integer PosTerminalId) {
      this.PosTerminalId = PosTerminalId;
  }
  
  /**
   *
   * @return
   * The CardId
   */
  public Integer getCardId() {
      return CardId;
  }
  
  /**
   *
   * @param CardId
   * The CardId
   */
  public void setCardId(Integer CardId) {
      this.CardId = CardId;
  }
  
  /**
   *
   * @return
   * The MerchantName
   */
  public String getMerchantName() {
      return MerchantName;
  }
  
  /**
   *
   * @param MerchantName
   * The MerchantName
   */
  public void setMerchantName(String MerchantName) {
      this.MerchantName = MerchantName;
  }
  
  /**
   *
   * @return
   * The TransactionPointsAmount
   */
  public Integer getTransactionPointsAmount() {
      return TransactionPointsAmount;
  }
  
  /**
   *
   * @param TransactionPointsAmount
   * The TransactionPointsAmount
   */
  public void setTransactionPointsAmount(Integer TransactionPointsAmount) {
      this.TransactionPointsAmount = TransactionPointsAmount;
  }
  
  /**
   *
   * @return
   * The TransactionMoneyAmount
   */
  public Double getTransactionMoneyAmount() {
      return TransactionMoneyAmount;
  }
  
  /**
   *
   * @param TransactionMoneyAmount
   * The TransactionMoneyAmount
   */
  public void setTransactionMoneyAmount(Double TransactionMoneyAmount) {
      this.TransactionMoneyAmount = TransactionMoneyAmount;
  }
  
  /**
   *
   * @return
   * The IsDeleted
   */
  public Boolean getIsDeleted() {
      return IsDeleted;
  }
  
  /**
   *
   * @param IsDeleted
   * The IsDeleted
   */
  public void setIsDeleted(Boolean IsDeleted) {
      this.IsDeleted = IsDeleted;
  }
  
  /**
   *
   * @return
   * The IsVoucher
   */
  public Boolean getIsVoucher() {
      return IsVoucher;
  }
  
  /**
   *
   * @param IsVoucher
   * The IsVoucher
   */
  public void setIsVoucher(Boolean IsVoucher) {
      this.IsVoucher = IsVoucher;
  }
  
  /**
   *
   * @return
   * The LoyaltyLevel
   */
  public Integer getLoyaltyLevel() {
      return LoyaltyLevel;
  }
  
  /**
   *
   * @param LoyaltyLevel
   * The LoyaltyLevel
   */
  public void setLoyaltyLevel(Integer LoyaltyLevel) {
      this.LoyaltyLevel = LoyaltyLevel;
  }
  
  /**
   *
   * @return
   * The CategoryId
   */
  public Integer getCategoryId() {
      return CategoryId;
  }
  
  /**
   *
   * @param CategoryId
   * The CategoryId
   */
  public void setCategoryId(Integer CategoryId) {
      this.CategoryId = CategoryId;
  }
  
  /**
   *
   * @return
   * The CardNo
   */
  public Object getCardNo() {
      return CardNo;
  }
  
  /**
   *
   * @param CardNo
   * The CardNo
   */
  public void setCardNo(Object CardNo) {
      this.CardNo = CardNo;
  }
  
  /**
   *
   * @return
   * The MerchantId
   */
  public Integer getMerchantId() {
      return MerchantId;
  }
  
  /**
   *
   * @param MerchantId
   * The MerchantId
   */
  public void setMerchantId(Integer MerchantId) {
      this.MerchantId = MerchantId;
  }
  
  }
  </code></pre>
  
  <p><strong>Fragment in which I want to include list:</strong></p>
  
  <pre><code>public class Izvjestaji extends Fragment {
  
  ListView list;
  @Override
  
  public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle                                                                                                 savedInstanceState) {
      // Defines the xml file for the fragment
  
  
      return inflater.inflate(R.layout.izvjestaji, parent, false);
  
  }
  
  // This event is triggered soon after onCreateView().
  // Any view setup should occur here.  E.g., view lookups and attaching view listeners.
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
      list=(ListView)view.findViewById(R.id.izvjestaji_list);
      showList();
  
      // Setup any handles to view objects here
      // EditText etFoo = (EditText) view.findViewById(R.id.etFoo);
  
  }
  public void showList(){
      NetworkSDK.getInstance().getTransactions(new Callback&lt;List&lt;Transactions&gt;&gt;() {
          @Override
          public void onResponse(Call&lt;List&lt;Transactions&gt;&gt; call, Response&lt;List&lt;Transactions&gt;&gt; response) {
              if(response.isSuccess()){
                  Log.d("Data", String.valueOf(response.isSuccess()));
                  TransactionsAdapter transactionsAdapter=new TransactionsAdapter((ArrayList&lt;Transactions&gt;)response.body());
                  list.setAdapter(transactionsAdapter);
  
  
              }
          }
  
          @Override
          public void onFailure(Call&lt;List&lt;Transactions&gt;&gt; call, Throwable t) {
              Log.d("Error","Def error");
  
          }
      });
  }
  }
  </code></pre>
  
  <p>2 xml files (one is from fragment and other is single item in list )
  <strong>Fragment layout :</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent" android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  
  &lt;ListView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:id="@+id/izvjestaji_list" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>Item_Layout:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="horizontal" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Datum"
      android:id="@+id/izvjestaji_datum"
      android:gravity="center"
      android:background="#a9a8a8"
      android:layout_weight="1"
      android:textSize="20dp" /&gt;
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/izvjestaji_partner"
      android:text="Partner"
      android:gravity="center"
      android:background="#a9a8a8"
  
      android:layout_weight="1"
      android:textSize="20dp" /&gt;
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/izvjestaji_iznos"
      android:text="Iznos"
      android:background="#a9a8a8"
      android:gravity="center"
  
      android:layout_weight="1"
      android:textSize="20dp" /&gt;
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/izvjestaji_brojbodova"
      android:text="Broj Bodova"
      android:gravity="center"
      android:background="#a9a8a8"
  
      android:layout_weight="1"
      android:textSize="20dp" /&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>In my preview I only get empty fragment</p>