How to keep an image within layout with drag and drop

后端 未结 1 830
醉话见心
醉话见心 2020-12-17 07:24

I have the following XML:



        
相关标签:
1条回答
  • 2020-12-17 08:03

    Looks like you have so e typos that cause your problem.

    Change

    if (x>0 || x<bm.getWidth() || y>0 || y<bm.getHeight())
    

    into this

    if (x>0 && x<bm.getWidth() && y>0 && y<bm.getHeight())
    

    Maybe that'll fix your issue.

    0 讨论(0)
提交回复
热议问题