title: assign arraylist value to textview
body: <p>I'm trying to set the value from my arraylist to the textview</p>
  
  <pre><code>    ArrayList&lt;Integer&gt; arrayListPage1, arrayListPage2, arrayListPage3, arrayListPage4, arrayListPage5;
  
      arrayListPage1 = new ArrayList&lt;Integer&gt;(rangeMode);
      arrayListPage2 = new ArrayList&lt;Integer&gt;(rangeMode);
      arrayListPage3 = new ArrayList&lt;Integer&gt;(rangeMode);
      arrayListPage4 = new ArrayList&lt;Integer&gt;(rangeMode);
      arrayListPage5 = new ArrayList&lt;Integer&gt;(rangeMode);
      totalCardInPage = new int[totalPage+1];
      for(int j=1;j&lt;=totalPage;j++){  
          int x=0;
          for(int i=1;i&lt;=rangeMode;i++){
              if(binaryTable[i][j]==1){                   
                  //maka i ada di page j
                  cardInPage[j][x]=i;
                  //array buat card di page 1
                  if (j==1){
                      arrayListPage1.add(i);
                  }else if(j==2){
                      arrayListPage2.add(i);
                  }else if(j==3){
                      arrayListPage3.add(i);
                  }else if(j==4){
                      arrayListPage4.add(i);
                  }else if(j==5){
                      arrayListPage5.add(i);
                  }
                  x++;                    
              }
          }
          System.out.println("page-"+j+" jumlah kartu:"+x);
          totalCardInPage[j]=x;
      }
      System.out.println("List page 1 "+arrayListPage1);
      System.out.println("List page 2 "+arrayListPage2);
      System.out.println("List page 3 "+arrayListPage3);
      System.out.println("List page 4 "+arrayListPage4);
      System.out.println("List page 5 "+arrayListPage5);
      TextView text1 = (TextView) findViewById(R.id.text1);
      if (arrayListPage1[0]!=null){
  
          text1.setText(arrayListPage1[0]);
      }
      else{
          text1.setVisibility(View.GONE);
      }
  
      if (arrayListPage1[1]!=null){
          text1.setText(arrayListPage1[1]);
      }
      else{
          text1.setVisibility(View.GONE);
      }
  </code></pre>
  
  <p>but I got an error when I'm trying to set the arraylist value to my textview. The error said because I'm using arraylist so I cannot assign the value to the textview</p>
  
  <p>anyone know how to fix this?</p>
  
  <p>thanks</p>