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

Popular posts from this blog

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

matlab - error with cyclic autocorrelation function -

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -