pedrovgs / DraggablePanel

Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.
Apache License 2.0
2.99k stars 606 forks source link

Moving mimized Panel above SoftKeyboard #95

Open Taranlayal10 opened 8 years ago

Taranlayal10 commented 8 years ago

Can you please suggest any way or idea to implement this thing as I am using your library in very high commercial app. When Soft keyboard is shown I want to move minimized panel at the top of the keyboard and Vice Versa. I have tried windowSoftInputModes also but it does not seem to be working.

pedrovgs commented 8 years ago

If that approach is not working you can try detecting when the keyboard is going to be shown and then change the size of the view or move the y position. Is this the answer to your question?

Taranlayal10 commented 8 years ago

Hi Perdrovgs, Thanks for your reply. I couldn't reply before coz I was working on some other thing. As you suggested I have tried setting the Y scale. Below is the code for that.

if (NavigationManager.getInstance().getDraggablePanel() != null && NavigationManager.getInstance().getDraggablePanel().isMinimized()) { NavigationManager.getInstance().getDraggablePanel().setYTopViewScaleFactor((float)100); }

But it does not work and however it does not seem to be a right way though as it may cause other issues like clicking on view and maximizing it again etc.

If you could suggest any other option that would be very helpful and also It is a must have feature also as your library is popular worldwide now. So hopefully if you could spend sometime on it.

Thanks

pedrovgs commented 8 years ago

Hi @Taranlayal10 what my suggestion was to move the y position of the draggable pannel view, not invoking setYTopViewScaleFactor method. Sorry if I didn't explain my suggestion properly. Could you try changing the top value of the layout params associated to the draggable panel? Doing this you'll move the entire view Y position instead of change the top view scale factor.

jruh23 commented 7 years ago

Hi,

I have a solution for this in my fork.

srikanthsunkari commented 7 years ago

hi @b00n12, I check in your fork I could see that draggable panel still behind the keypad. It can't move up of keypad. It'd be really helpful if you point me where to find the change in your fork.

jruh23 commented 7 years ago

Hi, i use the KeyBoardVisibilityEvent library in order to move the draggableview above the keyboard. So you have to set a listener for keyboardvisibilityevent to get it working: KeyboardVisibilityEvent.setEventListener(this, draggableView);

I will provide an example and issue a pull request as soon as I have time.

srikanthsunkari commented 7 years ago

Hi @b00n12,Thanks for update, It would be great if you will give pull request as soon as possible.