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.
我有一个视图,我想知道是否有办法测试视图是在顶层还是具有最大的 z 值。
除了在FrameLayout. _ 但是,您可以执行以下操作来验证视图本身是否是父视图:
FrameLayout
if(v.getParent() == null){ //view is parent } else{ //view is not parent }