saving the state of a SeekBar
<p>I'm struggling to find the best way to implement my update to the database</p>

<p>The code below is in the adapter for a list view, so each list item has its own seekbar.</p>

<p>The list is of homework assignments so each item has its own degree of completion which I need to persist to a database.</p>

<p>I have a <em>business method</em> which can do the database write, it just needs the id of the assignment and the new progress value.</p>

<pre><code>private void attachProgressUpdatedListener(SeekBar seekBar) {
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {

    public void onStopTrackingTouch(SeekBar seekBar) {
    // need to update database with new progress here!

    }

    public void onStartTrackingTouch(SeekBar seekBar) {
    // empty as onStartTrackingTouch listener not being used in
    // current implementation

    }

    public void onProgressChanged(SeekBar seekBar, int progress,
        boolean fromUser) {
    // empty as onProgressChanged listener not being used in current
    // implementation

    }
});

}
</code></pre>

<p>the problem I'm having is getting a handle to my AssignmentHandler which deals with the database reads / writes. I can pass the assignment_id to my attachProgressUpdatedListener without any issues but I'm not sure this is the best way to go about it as I haven't got / not sure I want an instance of AssignmentHandler instantiated inside the ArrayAdapter.</p>
