detect if views are overlapping

前端 未结 6 1389
名媛妹妹
名媛妹妹 2020-12-13 14:59

I have problem with drawing views on another size screens! I need method which has two parameters of View type. And return true if first view overlapping on second view, an

6条回答
  •  囚心锁ツ
    2020-12-13 15:21

    Seems like you are asking for code to your problem. I am posting the logic which I think may work:

    1. Create a funtion which will take two views as parameters, and returns a boolean.
    2. Now check the location of both views on the screen using this. It will give you the idea whether they are overlapping or not.
    3. Return true or false according to it.

提交回复
热议问题