Exactly,
You initialize all your *data *(not your views)* *in the appropriate state.
Then when the views become visible/available, they get the data and show it
correctly.
In other words, the view should be getting the data when they become
available. Don't 'push' the data to views (that may n
A way to look at this which just occurred to me is:
getSelectedItem() has to do with the data backing up the spinner. This
works even if the spinner stays hidden / gone the whole time, as it
should, since the data backing up the spinner always exists, regardless
of UI state.
getSelectedText
I agree, and I can adapt my code to use the selected item instead of
the selected view...but it is worth noting that the consequence of
this is that seemingly identical layouts can yield very different
behavior. In this case, two layouts containing invisible items can
return either a valid view or
On Thu, Apr 21, 2011 at 11:17 AM, Keith Wiley wrote:
> I have determined the discrepancy. Your code calls getSelectedItem()
> on the spinner. Mine calls getSelectedTextView(). In your case, you
> get a non-null response regardless of the visible status. In mine, I
> get a null if it is initial
I have determined the discrepancy. Your code calls getSelectedItem()
on the spinner. Mine calls getSelectedTextView(). In your case, you
get a non-null response regardless of the visible status. In mine, I
get a null if it is initially gone, but I get a TextView if it is
initially visible. Fur
Maybe you attach you sub-Layouts to parent Layout which refreshes all
child elements when the layout changes.
You can hide Elements from a parent layout programmatically - which
works fine for my usecase.
onCreate : Creates all Elements that may or may not be visible.(In my
case is't a Dialog)
s
I agree that yours seems to work. I'm trying to figure out the
difference between our code now. Thanks.
On Apr 21, 6:42 am, Mark Murphy wrote:
> I cannot reproduce your problem.
>
> For example, try:
>
> http://misc.commonsware.com.s3.amazonaws.com/SpinnerGone.zip
>
> This is the Selection/Spin
7 matches
Mail list logo