title: Adapter not display content
body: <p>I am trying to populate data from my main activity using the adapter below. When i run the   activity the screen remains blanked. I believe it has to do with the ArrayList which is null perhaps. Can someone tell me why my data is not being displayed. am on this bug for three days now :/</p>
  
  <pre><code>public class CopyOfSecondWheelAdapter extends AbstractWheelTextAdapter {
  
      ArrayList&lt;convertor_pst&gt; PostList = new ArrayList&lt;convertor_pst&gt;();
      public ImageLoader imageLoader; 
  
      Convertor main;
  
      public CopyOfSecondWheelAdapter(Context context) {
          super(context, R.layout.count_layout, NO_RESOURCE);
          setItemTextResource(R.id.country_name);
      }
  
      @Override
      public View getItem(int index, View cachedView, ViewGroup parent) {
  
          View view = super.getItem(index, cachedView, parent);
          ImageView img = (ImageView) view.findViewById(R.id.flag);
  
          imageLoader.DisplayImage(PostList.get(index).getDevise(), img);
          System.out.println("get item count:"+getItemsCount() );
  
          TextView text = (TextView)view.findViewById(R.id.lib);
          text.setText(PostList.get(index).getQuotite());
  
          return view;
      }
  
      @Override
      public int getItemsCount() {
          return  PostList.toArray().length;
      }
  
  
      @Override
      protected CharSequence getItemText(int index) {
          return PostList.get(index).getDevise().toString();
      }
  }
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>In my Main class i have already an </p>
  
  <pre><code>ArrayList&lt;convertor_pst&gt; PostList = new ArrayList&lt;convertor_pst&gt;();
  </code></pre>
  
  <p>which is populated.</p>
  
  <p>Here is my main class that is my convertor.class</p>
  
  <pre><code>ArrayList&lt;convertor_pst&gt; PostList = new ArrayList&lt;convertor_pst&gt;();
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.convertor);
          context = this;
  
          text_devise_two = (TextView)findViewById(R.id.text_spacetwo);       
  
          final WheelView country = (WheelView) findViewById(R.id.country);
          country.setVisibleItems(10);
          country.setViewAdapter(new FirstWheelAdapter(this));
  
  
          edt_validate = (EditText)findViewById(R.id.edt_validate);
  
          current_type_loc = (TextView)findViewById(R.id.current_type_loc);
          refresh_header= (TextView)findViewById(R.id.refresh_header);
  
          //set current time
          Calendar c = Calendar.getInstance();
          SimpleDateFormat df = new SimpleDateFormat("dd/MMM/yyyy");
          String formattedDate = df.format(c.getTime());
          refresh_header.setText(getResources().getString(R.string.mise_a_jour)+" "+formattedDate);
  
          image_one = (ImageView)findViewById(R.id.image_one);
          image_two = (ImageView)findViewById(R.id.image_two);
  
          final WheelView currency = (WheelView) findViewById(R.id.currency);
          currency.setVisibleItems(10);
          currency.setViewAdapter(new CopyOfSecondWheelAdapter(this));
  
          country.addChangingListener(new OnWheelChangedListener() {
              @Override
              public void onChanged(WheelView wheel, int oldValue, int newValue) {
  
                  if (!scrolling) {
  
  
                  }
              }
          });
  
          country.addScrollingListener( new OnWheelScrollListener() {
  
              @Override
              public void onScrollingStarted(WheelView wheel) {
  
                  scrolling = true;
              }
  
              @Override
              public void onScrollingFinished(WheelView wheel) {
  
                  scrolling = false;
                  //1.
                  wheelSelector(country.getCurrentItem());
  
              }
          });
  
  
          currency.addScrollingListener( new OnWheelScrollListener() {
  
              @Override
              public void onScrollingStarted(WheelView wheel) {
  
                  scrolling = true;
              }
  
              @Override
              public void onScrollingFinished(WheelView wheel) {
  
                  scrolling = false;
                  //1.
                  secondWheel(currency.getCurrentItem());
              }
          });
  
  
  
          country.setCurrentItem(1);
          currency.setCurrentItem(3);
          new loadingTask().execute();
      }
  
      /*1. Change currency */
      public void wheelSelector (int id){
  
          if (id==0){
  
              current_type_loc.setText("EUR");
              image_one.setBackgroundResource(R.drawable.eur);
  
          }else {
  
              current_type_loc.setText("USD");
              image_one.setBackgroundResource(R.drawable.usd);
  
          }
      }
  
      class loadingTask extends AsyncTask&lt;Void, Void,Void&gt; {
  
            @Override
          protected void onPreExecute() {
          // TODO Auto-generated method stub
              pd = ProgressDialog.show(Convertor.this, "", "Chargement en cours..", true);
  
              super.onPreExecute();
          }
  
          @Override
          protected void onPostExecute(Void result) {
          // TODO Auto-generated method stub
              super.onPostExecute(result);
  
              pd.dismiss();
              doc = Jsoup.parse(getxml,"", Parser.xmlParser());
  
              taux = doc.select("taux");
  
              for (int i = 0; i &lt; taux.size(); i++) {
  
                  PostList.add(new convertor_pst(taux.get(i).getElementsByTag("devise").text().toString(),
                          taux.get(i).getElementsByTag("dateCours").text().toString(),
                          taux.get(i).getElementsByTag("libelle").text().toString(),
                          taux.get(i).getElementsByTag("quotite").text().toString(),
                          taux.get(i).getElementsByTag("fixing").text().toString()));
              }
          }
  
          @Override
          protected Void doInBackground(Void... params) {
          // TODO Auto-generated method stub
  
               envelope =
                      "soap content"
  
              String requestEnvelope=String.format(envelope, "28-03-2013","true");
              getxml = Util.CallWebService(URL,SOAP_ACTION,requestEnvelope);
              System.out.println(getxml);
  
              return null; 
  
          }
      }
  
  
      public void secondWheel(int index){
  
          text_devise_two.setText(PostList.get(index).getDevise());
          edt_validate.setText("   "+PostList.get(index).getFixing());
  
      }
  
      /*
       * 
       * (non-Javadoc)
       * @see android.app.Activity#onPause()
       * check if activity go to background
       */
  
      @Override
      protected void onPause() {
          // TODO Auto-generated method stub
          super.onPause();
  
          if (Util.isApplicationBroughtToBackground(Convertor.this)==true){
              startActivity(new Intent(Convertor.this,Compte.class));
          }
  
      }
  
  
  }
  </code></pre>
  
  <p>This is the original wheel adapter class</p>
  
  <pre><code>public class CopyOfSecondWheelAdapter extends AbstractWheelTextAdapter {
  
      ArrayList&lt;convertor_pst&gt; PostList;
      public ImageLoader imageLoader; 
  
      // Countries names
      private String countries[] =
              new String[] {"EUR", "USD","EUR", "USD","EUR", "USD","EUR", "USD","EUR", "USD","EUR", "USD"};
  
      // Countries flags
      private int flags[] = new int[] {R.drawable.eur, R.drawable.usd,R.drawable.eur, R.drawable.usd,R.drawable.eur, R.drawable.usd,R.drawable.eur, R.drawable.usd,R.drawable.eur, R.drawable.usd,R.drawable.eur, R.drawable.usd};
  
      /**
       * Constructor
       */
  
      Convertor main;
  
      public CopyOfSecondWheelAdapter(Context context) {
          super(context, R.layout.count_layout, NO_RESOURCE);
          setItemTextResource(R.id.country_name);
  
      }
  
      @Override
      public View getItem(int index, View cachedView, ViewGroup parent) {
  
          View view = super.getItem(index, cachedView, parent);
          ImageView img = (ImageView) view.findViewById(R.id.flag);
          img.setImageResource(flags[index]);
  
          TextView text = (TextView)view.findViewById(R.id.lib);
          text.setText("code");
  
          return view;
      }
  
      @Override
      public int getItemsCount() {
          return  countries.length;
      }
  
  
      @Override
      protected CharSequence getItemText(int index) {
          return countries[index];
      }
  }
  </code></pre>