Changed Array to Arraylist so that I can manipulate the Array
<p>got a few problem here and hoping that you could help me out.</p>

<p>Let me first clarify the situation:</p>

<p>I have a static array of Integer in which inside was a R.drawable.images. Codes are as follows</p>

<pre><code>private   Integer[] imageIDs = {
            //R.drawable.medal_my_first_perxtamp,
            R.drawable.medal..._gray,
            R.drawable.medal_y...te_me_gray,
            R.drawable.medal_t...ring_gray,
            R.drawable.medal_gi...ray,
            R.drawable.medal_a..._gray,
            R.drawable.medal_se..gray,
            R.drawable.medal_p...._gray,
            R.drawable.medal_m..._gray,
            R.drawable.medal_lo.._gray,
            R.drawable.m..._gray,
            R.drawable.med..,
            R.drawable.med..on_gray
          };
</code></pre>

<p>Now what I am trying to do is change the value of imageIDs based on a condition so now ive added this code on getview</p>

<pre><code>       sqlAdapter = new SQLiteAdapter(mContext);
        sqlAdapter.openToRead();
        List&lt;Integer&gt; imageIDList = Arrays.asList(imageIDs);
        String query2="Select achievementID  from achievementdata_tb where memberID = 101";
        Cursor cursor2 =sqlAdapter.read(query2);
        if (cursor2 != null &amp;&amp; cursor2.moveToFirst()) {
            while(cursor2.moveToNext()){

                val =cursor2.getString(0);
                int val2 = Integer.parseInt(val);
                String returnDrawable = getDrawables(val);
                int intReturnDrawable = Integer.parseInt(returnDrawable);
                imageIDList.set(val2, intReturnDrawable);
            }
        }
</code></pre>

<p>Note that I am getting values from database(achievement_ID) and the values is (6,2,3)</p>

<p>So what I did is get the cursor's item one by one and check it on a public void <strong>getDrawables</strong> consist of </p>

<pre><code>        public String getDrawables(String str){
        if (str.equals("3")){
            str= "R.drawable.med...g";
        }
        else if (str.equals("2")){
            str= "R.drawable.med..._me";
        }
        else if (str.equals("6")){
            str= "R.drawable.me...._up";
        }
        return str; 
    }
</code></pre>

<p>See that I want to change the value of array imageIDs (which is a drawable) to another drawable image.</p>

<p>I dont have any error so I use debugger and found out that I am getting an error on this part <strong>int intReturnDrawable = Integer.parseInt(returnDrawable);</strong></p>

<p>I am new to andriod but i know some basic functionalities..
Could you help me solve this out?</p>
