当我从Android 9.0中的对话框构建一个popupWindow时,其positionX为负,popupWindow的左侧内容被剪裁

问题描述 投票:1回答:1

当我从Android 9.0中的对话框构建popupWindow时,其positionX为负数,popupWindow的左侧内容被剪切。我在所有其他系统上尝试了这个(在9.0之前),它正常工作,popupWindow通常显示在对话框的左侧。下面有两张图片,左边是8.0,右边是9.0。我想知道它是系统的错误还是9.0的新功能,我怎么能让popupWindow显示而不剪辑?

android frameworks android-popupwindow
1个回答
0
投票

我也遇到了这个问题。我发现主题材料和DeviceDefault是正常的。您可以将材质或DeviceDefault主题设置为app.Or setTheme(Material / DeviceDefault)show popupwindow,以及setTheme(主题之前)隐藏popupwindow时。

© www.soinside.com 2019 - 2024. All rights reserved.