title: Array size 0 in adapter > 0 in MainActivity?
body: <p>Well this is very strange thing that happen to me.. I have an ArrayAdapter where the size of <code>data</code> value result in the logcat = 0. So this array seems empty. I try to insert in the MainActivity, where i add my item at the list, the condition to see the array size that result  > 0. I need that this array is equal at another array infact the condition is:</p>
  
  <pre><code>if (titoli.size() &gt; data.size())
                  Log.w("Array compare", "Titoli &gt; Data!"+ " " + titoli.size() + " " + data.size());
  </code></pre>
  
  <p>And the result is <code>Titoli &gt; Data 48 38</code> in the MainActivity and <code>Titoli &gt; Data 48 0</code> in the adapter!! So the list crash!! To bypass this problem i created this condition:</p>
  
  <pre><code>if (this.data.size() &gt; 0){
              cache.dateArticoli.setText(data.get(pos));
          }
  </code></pre>
  
  <p>Now the Activity starts without crashes but the <code>data</code> appears only when i begin to scroll the list and when i arrive at the end of the list i have the crash with this logcat:</p>
  
  <pre><code>01-23 16:42:16.955: E/AndroidRuntime(19400): FATAL EXCEPTION: main
  01-23 16:42:16.955: E/AndroidRuntime(19400): Process: it.dd.multiplayerit, PID: 19400
  01-23 16:42:16.955: E/AndroidRuntime(19400): java.lang.IndexOutOfBoundsException: Invalid index 33, size is 33
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at java.util.ArrayList.get(ArrayList.java:308)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at it.dd.multiplayerit.ParsingArrayAdapter.getView(ParsingArrayAdapter.java:97)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.widget.AbsListView.obtainView(AbsListView.java:2240)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.widget.ListView.makeAndAddView(ListView.java:1790)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.widget.ListView.fillDown(ListView.java:691)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.widget.ListView.fillGap(ListView.java:655)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.widget.AbsListView.trackMotionScroll(AbsListView.java:5136)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4247)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.view.Choreographer.doCallbacks(Choreographer.java:574)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.view.Choreographer.doFrame(Choreographer.java:543)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.os.Handler.handleCallback(Handler.java:733)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.os.Handler.dispatchMessage(Handler.java:95)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.os.Looper.loop(Looper.java:136)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at android.app.ActivityThread.main(ActivityThread.java:5081)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at java.lang.reflect.Method.invoke(Native Method)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
  01-23 16:42:16.955: E/AndroidRuntime(19400):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  </code></pre>
  
  <p>I can't understand why!</p>
  
  <p>at line 97:</p>
  
  <pre><code>cache.dateArticoli.setText(data.get(pos));
  </code></pre>