Giter VIP home page Giter VIP logo

Comments (5)

csh159 avatar csh159 commented on May 24, 2024

设置setGravity(FxGravity.RIGHT_OR_BOTTOM),代码调用setBorderMargin(0,0,200,0)无效,会跑到屏幕上面去

from floatingx.

Petterpx avatar Petterpx commented on May 24, 2024

设置setGravity(FxGravity.RIGHT_OR_BOTTOM),代码调用setBorderMargin(0,0,200,0)无效,会跑到屏幕上面去

setBorderMargin() 方法是用于设置移动位置的边框,比如setBorderMargin(0,0,200,0),相当于浮窗可移动位置距离屏幕底部会有200px的偏移量。动态更新位置的话,这个的确之前没考虑过,这边可以增加一个api去处理。

from floatingx.

Petterpx avatar Petterpx commented on May 24, 2024

比如在某些页面距底部30dp,但是有些页面不需要间距?

新版本1.2.4已增加新的api,moveLocation() 与 moveLocationByVector(),使用示例如图:
image

from floatingx.

appdev avatar appdev commented on May 24, 2024

move 有时候不生效

from floatingx.

appdev avatar appdev commented on May 24, 2024

move 有时候不生效

这个是因为先设置了setGravity的原因,但是会出现传相同的坐标,悬浮窗还在移动的问题,比如 show的时候传坐标 150,200。后面连续传100,100 会出现在 [150,200] [100,100]来回移动的问题

from floatingx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.