微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

微调器下拉列表显示在微调器小部件下方

如何解决微调器下拉列表显示在微调器小部件下方

我需要 spinner 的列表显示在其小部件下方。

我试过在我的 OP6 手机上运行的 android:dropDownVerticalOffset="15dp",但在三星手机上不起作用。而且 id:overlapAnchor="false" 也不起作用。

有人有什么推荐吗?

<Spinner
                android:id="@+id/spStates"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:background="@drawable/bg_expandable_parent_item"
                android:dropDownVerticalOffset="65dp"
                android:elevation="0dp"
                app:layout_constraintTop_toTopOf="@id/tv_headline"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintBottom_toBottomOf="@id/tv_headline"
                />

我想要什么(OP6):

enter image description here

它的显示方式(三星):

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。