Check out example codes for "libgdx move camera with touch". It will help you in understanding the concepts better.

Code Example 1

@Override
public boolean touchDragged(int screenX, int screenY, int pointer) {
    //difference between the current pointer location and the last pointer location on X axis
    float x = Gdx.input.getDeltaX();
    //difference between the current pointer location and the last pointer location on Y axis
    float y = Gdx.input.getDeltaY();

    camera.translate(-x,y);
    return true;
}

Learn ReactJs, React Native from akashmittal.com