Populate wheel adapter android
<p>This is my second wheelAdapter</p>

<pre><code>public class SecondWheelAdapter extends AbstractWheelTextAdapter {


// 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 SecondWheelAdapter(Context context) {
        super(context, R.layout.country_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]);

        return view;
    }

    @Override
    public int getItemsCount() {
        return countries.length;
    }


    @Override
    protected CharSequence getItemText(int index) {
        return countries[index];
    }
}
</code></pre>

<p>i need to add the data below to my adapter from my main convertor class.</p>

<pre><code>public class Convertor extends Activity {



    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;

        final WheelView country = (WheelView) findViewById(R.id.country);
        country.setVisibleItems(10);
        country.setViewAdapter(new FirstWheelAdapter(this));

        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 SecondWheelAdapter(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());
            }
        });

        country.setCurrentItem(1);
        currency.setCurrentItem(5);

         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());


            Elements datecours = doc.select("dateCours");



            String datecour[] = datecours.text().toString().split(" ");


            for (int i = 0; i &lt; taux.size(); i++) {

                PostList.add(new convertor_pst(devis[i],datecour[i],libel[i],quot[i],fix[i]));
            }

        }


        @Override
        protected Void doInBackground(Void... params) {
        // TODO Auto-generated method stub

            getxml = Util.CallWebService(URL,SOAP_ACTION,requestEnvelope);
            System.out.println(getxml);
            return null; 

        }
    }

}
</code></pre>

<p>that is i need to get rid of countries[] so that i can replace it with libel array. but when parse the libel array using static method it force close the application. is there a way to get rid of the countries[] array and replace it with an equivalent but using libel array.</p>
