1
Dear to an activity where we are making a change, I am setting the value of spinner(s) in a gross way
for(int i = 0; i < clienteAdapter.getCount(); i++) {
Cliente elemento = (Cliente) clienteAdapter.getItem(i);
if(elemento.getId() == pedido.getId_cliente()) {
spCliente.setSelection(i);
break;
}
}
I’m getting the data populating the Sqlite Spinner, would have a more elegant way of doing this?
The problem is that Android(for now) can’t stand it java 8 streams
– ramaral
Retrolambda and other compatibility libraries can help you write Java 8 and run wherever you want. I can’t remember what the processor was for stream compatibility, but I think in the retrolambda documentation he quotes someone
– Jefferson Quesado
It seems to me that this boy did the backport job : https://github.com/streamsupport/streamsupport/
– Jefferson Quesado
Ramaral and Jefferson, truth, I had not noticed. Was using Android Studio 3.0 Dev. Preview and testing with an android 7.1.2.
– Carlos Bridi
That’s why I said "for now". With Android Studio 3 is possible however only for apps with minSdk 24 or higher.
– ramaral