Per RomainGuy...
Calling getChildAt(position) is wrong, it will NOT work. The position
is the index of the item in the adapter.
The list only contains enough items to fill the screen. For instance,
views 0 to 4 in the list on screen can
correspond to items 10 to 14 in the adapter. The numbers do not match.
You need to translate between the
two using getFirstVisiblePosition(). That's why you get a null result
past the first 4 children. You simply
misunderstand how lists and adapters work together.

Also, on Android 1.5, the keyboard shows up in fullscreen mode above
the AutoCompleteTextView. You
cannot scroll through the list and select an item. It is possible
however to click a completion item in the
onscreen keyboard, which does send a click even with a null view
(because the click did not occur in the drop
down itself.) The listener simply cannot rely on the value of v.


On May 31, 7:19 pm, Ty <[email protected]> wrote:
> I am pretty sure this is a bug and have reported it under issue #2815
>
> Ty
>
> On May 31, 5:05 pm, Ty <[email protected]> wrote:
>
> > I have an app that has been working great until I changed the app to
> > use sensor and tested in 1.5.  When turning the phone sideways with
> > keyboard closed, I click on the autoCompleteTextView EditText I have
> > setup.  This brings up the on screen keyboard.  Great.  I start typing
> > a name and get a dropdown list of say 5 names to select from.  Great.
> > This dropdown is sideways not vertical.  This is new and I am assuming
> > this has to do with the onscreen keyboard.  I select one of those
> > names and it does a callback to my onItemClickListener.  Great.  So
> > far so good.
>
> > Problem is that the View returned is always null.  Always.
>
> > If I change the phone back to portrait and do the same all is good and
> > I can safely rely on the view returned to the listener.
>
> > If I leave the phone in landscape but open the physical keyboard then
> > it works just fine.
>
> > Why would the view be null with this new horizontal drop-down?  Is
> > there a different type of listener I should use.  Should I be setting
> > something differently in my CursorAdapter?  Any help is much
> > appreciated.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to