 <p>If your result will be dynamic(The string length would vary in future) the below solution may work,</p> <pre><code>private void rellenarSpinnerConFoliosDeMaquinasDelPunto(List&lt;String&gt; folios) { try{ maquinas = dbOn.getMaquinasDePunto(idPunto); for (int i = 0; i &lt; maquinas.size(); i++) { foliosDeMaquinas.add(maquinas.get(i).getcFolioMaquina().toString().split("-")[1]); } } catch(ArrayIndexOutOfBoundsException e){ e.printStackTrace(); } adaptadorFoliosMaquina = new ArrayAdapter&lt;&gt;(this, android.R.layout.simple_spinner_dropdown_item, folios); adaptadorFoliosMaquina.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spn_folioMaquina.setAdapter(adaptadorFoliosMaquina); spn_folioMaquina.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { </code></pre>