MusicalYoutube
MusicalYoutube copied to clipboard
Dragging player does not work in github while it works in playstore version
Dragging player does not work in github while it works in playstore version
Use this code inside YoutubePlayerService class :
case MotionEvent.ACTION_MOVE:
if (!playerView.isDragging) {
return false;
}
int deltaX = (int) (event.getRawX() - initialTouchX);
int deltaY = (int) (event.getRawY() - initialTouchY);
initialTouchX = (int) event.getRawX();
initialTouchY = (int) event.getRawY();
params.x += deltaX;
params.y += deltaY;
windowManager.updateViewLayout(container, params);
return true;