tags:

views:

58

answers:

2

I have a dialog window that covers 1/3 of the entire screen height and is displayed on top of my activity. The dialog holds two AutoCompleteTextView fields.

The problem I'm facing is that when the user starts typing something into the AutoCompleteTextView, the list with all suggestions only shows up to the bottom end of the dialog, but doesn't go beyond that even the list is longer. It looks like it's cut off. (screenshot left)

Only after I long-press an item from the suggestion list, the list will be shown in full length. (screenshot right)

Screenhot is at: http://img704.imageshack.us/i/dialogdropdown.png/ screenshot

How to fix this behaviour so that the list shows in full length right from the beginning, when the user starts typing something?

Code-wise there's nothing special, all I do is:

ArrayAdapter<String> adapter = new ArrayAdapter<String>(this.getContext(), R.layout.nav_route_autocomplete_row, locStrings);        
AutoCompleteTextView txtStartPos = (AutoCompleteTextView) findViewById(R.id.txtStartPos);
txtStartPos.setAdapter(adapter);
...

One workaround idea is to somehow dispatch a motion event to simulate a touch (but then not selecting though) one of the list items. Any concrete idea in code for a solution, anybody?

A: 

Right now I'm assuming it's a bug, which I already filed here: http://code.google.com/p/android/issues/detail?id=9917

But if anybody knows a solution to this, I'd greatly appreciate it and would be glad to trade it for some bounty points.

Edit:

One workaround that came to my mind is now to extend the dialog to the very bottom of the screen but leave the background transparent, so it looks the same as now, but actually has a height that wouldn't cut off the list. I will give that a try...

Mathias Lin
A: 

Just a shot in the dark, but have you tried setting android:clipChildren to false on the view for the dialog atop your Activity?

iandisme
I tried so set that attribute for the very outer LinearLayout of my dialog layout, and also for all others of which the AutoCompleteTextView is a (sub)child of. But it doesn't help. Since it's a dialog, it should be more of like window.setClipChildren(false), but unfortunately such a method doesn't exist for window. Or some flags like window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); but that all doesn't help.
Mathias Lin