Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将两个列表视图放在 android 布局中的同一位置。一次可以看到一个列表视图。我试过了,但即使第一个列表视图不可见,第二个列表视图也从布局的中间开始?请告诉我如何动态创建和销毁列表视图,以便在同一点上,两个列表视图一次开始一个
将两个列表视图放在一个FrameLayout. 而已。FrameLayout 不对包含的视图进行定位,只是将它们一个一个打印出来。正如您所写,只需确保一次只有这些视图设置为可见。
FrameLayout