Spinner Initial Selected Item

30 views
Skip to first unread message

Carlos Eduardo Rodrigues de Almeida

unread,
Oct 13, 2015, 4:44:09 PM10/13/15
to RoboBinding
I have a Project that is using a Spinner. I have already added the bind:source, bind:itemLayout and bind:dropdownLayout.

In my Presentation model I have a list with a @ItemPresentationModel. Everything is working as expected.

The Spinner has the values from 0 to 9 and, when the user selects a new number, I update the selected element with the bind:onItemSelected event.

The problem is that I can´t find any way to set the spinner with the value 1 instead of 0 as the selected element when the user enter the screen.

Thank you

cheng

unread,
Oct 13, 2015, 6:10:53 PM10/13/15
to RoboBinding
Hi Carlos,

Can you try checkedItemPosition attribute like the example below:
Line 102 - https://github.com/RoboBinding/RoboBinding-gallery/blob/master/app/src/main/java/org/robobinding/gallery/presentationmodel/ListViewPresentationModel.java

Cheers,
Cheng

在 2015年10月14日星期三 UTC+11上午7:44:09,Carlos Eduardo Rodrigues de Almeida写道:

Johnny TwoShoes

unread,
Jan 6, 2016, 3:49:58 AM1/6/16
to RoboBinding
Hi,

I have a similar problem. Did you get it to work? Can you please show me how to do it.

kind regards
Reply all
Reply to author
Forward
0 new messages