recruit-lifestyle/FloatingView

Set initial X and Y and keep move to side feature

rachelfong opened this issue · 1 comments

Hi @YoshihideSogawa,

I am currently using this library to implement a floating view for my application, however my projects requires two funtionalities:

  1. Initialize position to be at the bottom corner of the screen
  2. If user drags the floating view to the middle of the screen, it will be moved to the closest left/right side instead of letting the view stay in the middle of the application.

What I have come to realize is that if I use:

options.floatingViewX = metrics.widthPixels - sizeOfChatHead;
options.floatingViewY = (int) this.getResources().getDimension(R.dimen.general_padding);

to set the icon to bottom left corner, I lose the second functionality.
If I don't set this option, it works the way I want it but it defaults the position on the top left corner of the screen.

Is there a way around this?

Issue is solved by updating to latest version.