I would like to know the best way on how to implement horizontal scrolling to only part of the view and vertical scrolling to complete view. I was able to achieve horizontal and vertical scrolling to the complete view. If I have to use layers can you explain a bit more on how to achieve layers and draw shapes on those layers separately.
I tried using two different SurfaceViews it does not work. Here is my code for scrolling horizontally.
@Override public void onDrawFrame(GL10 unused) {
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
// Set the camera position (View matrix)
Matrix.setLookAtM(mVMatrix, 0, mXOffset, mYOffset, -3, mXOffset, mYOffset, 0f, 0.0f, 1.0f, 0.0f);
// Calculate the projection and view transformation
Matrix.multiplyMM(mMVPMatrix, 0, mProjMatrix, 0, mVMatrix, 0);
mGraph.draw(mMVPMatrix);
mLine.draw(mMVPMatrix);
msquare.draw(mMVPMatrix);
}