PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

Position dropdown menu below the spinner on Android #135

Closed terreb closed 6 years ago

terreb commented 6 years ago

Currently the dropdown menu overlays the spinner when open, but normally should be below: https://developer.android.com/guide/topics/ui/controls/spinner.html

How can I change the dropdown menu position to be below the spinner? I do understand there might not be a built-in method, native Android solution will suffice. Thank you.

PeterStaev commented 6 years ago

Hey @terreb , I'm not sure but I think where the spinner is shown depends on what version of Android you are running. But if there is some option that I'm overlooking you can set it by accessing the native android control via dd.android. This is a Spinner object so you can set any option that you can normally set if you are developing naively on android. Hope this helps.

terreb commented 6 years ago

Hey @PeterStaev, thank you for your reply. I found how to do that. I will leave the fix here just in case someone else will need a solution.

dd.android.setDropDownVerticalOffset(VALUE_HERE) // value is specific to each use case