How to replace a value from an array list dynamically when a user edits the array of values?
<p>How do I replace a value from an array list dynamically when the user edits the array of values? I used <code>arr_list.set(count,"replace value")</code> inside button <code>click.Action</code> done by using the button click event. So I used count for index of <code>arr_list</code>. I have an issue as I click the button it replaces all the values in <code>arr_list</code>. I want to replace particular edit values done by user.</p>

<p>if (v == right) {</p>

<pre><code> if (riskList.size() == 0) {

        } else 
              {
            try {
                riskList.set(count2,key.getText().toString());
                Log.i("dfDF", "" + count2);
                key.setText(riskList.get(count2).toString());
                toGetIndex = key.toString();
                int indexPlus = riskList.indexOf(toGetIndex);
                risk.setText(descList.get(count2).toString());
                totalRiskin.setText(count2 + 1 + "/" + totalRisks);

            } catch (IndexOutOfBoundsException ex) {
                Toast.makeText(SalesEditActivity.this,
                        "There is no next element", Toast.LENGTH_SHORT)
                        .show();
            }
            count2 = count2 + 1;

        }
    }
</code></pre>

<p>I have used previous and next button to display array list values according to index.ie count. I also want edit array list values,it will be replace the current index value.</p>
