-
Notifications
You must be signed in to change notification settings - Fork 605
Support for orientation, useful three new listeners and improvements about compatibility with ExoPlayer #86
base: develop
Are you sure you want to change the base?
Conversation
…d Accurate Listening
Hi @rencsaridogan, thanks for your PR. I'm going to review it right now. I've noticed that your PR is breaking the checkstyle rules I've configured. Can you review the code and format it to match with the checkstyle? If you want to do it automatically you can use this project to configure your IDE: https://github.com/square/java-code-styles |
* Called when the view is being dragged to either minimize or maximize | ||
*/ | ||
|
||
void smoothSlide(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change the naming of the methods you've added to match with the naming of the project. If you review the methods already implemented all start using on
as prefix. Based on that, we should rename these last three methods to:
void onTouch()
void onClickedToMaximize()
void onClickedToMinimize();
void onSmoothSlide();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on it.
…rovements and comments
@pedrovgs I've implemented a change for anyone to be able to choose any rotation they like for the panel to work (Default is all), implemented the changes and applied the improvements we've discussed. ExoPlayer example is not added yet, working on that to prepare the best example to work on. After the review you can merge this without waiting the example version. After the fixes and improvements it shouldn't effect the current version anyhow. Instead it should be adding the new features. Best regards, |
Sorry for the delay @rencsaridogan, I've been out for some time. I think I can wait for the ExoPlayer example before to merge this PR. Please, if you have time add the example and the documentation needed to show how to use the new feature :) |
Hello,
I've been using DraggablePanel with ExoPlayer but there were problems since I was using SENSOR when DraggablePanel was active, and I was using PORTRAIT on minimized. I needed to check SecondView Alpha and I was in need of Timers to make the isMaximized, isMinimized better. So I added the listeners below and improved when they are triggered:
onTouchListener
clickedToMaximized
clickedToMinimize
smoothSlide
The improvements also helped me to collect true data about how much DraggablePanel is used because it was throwing events way more since onMaximized and onMinimezed were called more than once in some cases.
You have to initialize timers when you are initializing the DraggableView with the code below:
draggable_view.initializeTimers();
My code for the Listener looks like below:
Best regards,
Renç Sarıdoğan.