Load SoundPool in a thread while application is started
<p>it's my first question here. I searched all the way, tried a lot but couldn't get what I want to do. Here's the problem: I have an app that uses SoundPool to play sounds, just that. But there's a lot to load (>50) and it takes time to load one by one. take a look;</p>

<p>@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_fragment_hue, container, false);
        DBSupport.setContext(getActivity());
        lista = DBSupport.getListaHue();</p>

<pre><code>    sp = new SoundPool(4, AudioManager.STREAM_MUSIC, 0);

    final ArrayList&lt;CharSequence&gt; lista_string = new ArrayList&lt;CharSequence&gt;();

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

        Hue e = null;
        e = lista.get(i);
        e.setValor(sp.load(getActivity(), getResId(e.getNome_hue(), ListaHues.class), 1));
        lista_string.add(lista.get(i).getDescricao());
    }
</code></pre>

<p>And I want to make a thread or an Async to load it while I scroll through the ListView</p>

<p>Any advice?</p>

<p>PS: I'm a newbie, so sorry if the code is confuse.</p>

<p>Thanks!!</p>