android - Get All views higher in z index than given View? -
i have find out views higher in z-index ( overlapping ) given view
public list<view> getviewshigherinzindex(view givenview) { //return views higher in z index givenview }
one of approach thought involves finding parent view of given view , recursively finding elements. though have view elements, how can determine z-index of child views. how can compare them find out if overlapping. can rectangle bounds , see if intersecting doesn't give z-order.
you use recursive dfs walk view hierarchy viewgroup.getchildat()
, use view.getz()
compare z values.
Comments
Post a Comment