android - Spinner not showing selected item -
problem
my problem after changing data in spinnerarrayadapter
spinner
not react item clicks on dropdownlist
. after orientation change occurs working fine(?!). edit: noticed catch item clicks not representing/showing on spinner
. because after orientation change selected item appears on spinner
construction
i have autocompletetextview(actv)
that's connected autocompleteadapter implementing filterable
. after entering data actv
result passed spinnerarrayadapter
connected spinner
.
there customlistener
set on autocompleteadapter
connected spinnerarrayadapter
, responsible passing data between them.
reason behind such construction user can have 2-step choice. 1 on drop-down when choosing data actv
, second 1 in case change mind. can put postcode in actv
select province that's connected , change province when miss-clicked/changed mind without forcing enter postcode again.
code
this part responsible data change inside spinnerarrayadapter
.
@override public void setcitiesfrompostcode(arraylist<string> cities) { this.clear(); this.addall(cities); notifydatasetchanged(); }
i had similar problem arrayadapter
. changed baseadapter
, works. don't know reason is, it's somewhere in implementation of arrayadapter
.
Comments
Post a Comment