单击时可以获取一行的屏幕位置吗?

It is possible to get the screen position of a row when it's clicked?

是否可以在单击时获取特定行在适配器内部的屏幕位置?我想要的是使用背景暗淡的对话框,但我希望它显示在被单击的行下方。 Popupwindow 默认情况下会这样做,但我无法使背景变暗,这就是我尝试使用对话框的原因。

您可以使用以下函数获取视图的屏幕位置:

View.getLocationOnScreen()
getLocationInWindow()

但是尝试将对话框放置在屏幕的特定位置可能不是一个好主意,让系统来处理。