Reputation: 1339
I am actually facing a problem I want to draw a line programatically using surfaceview this line will be high as the screen is and I want the line to be drawn vertically. I've defined the surfaceview in my XML but I want to edit it now. Hope that somebody can help me.
Upvotes: 0
Views: 555
Reputation: 1881
Each GLSurfaceView has a Render. Each Render has onDraw method(or something like that). Acctually there are 3 methods. First one is executed to init stage, Second one is used to Prepare the stage and Third one is for Drawing. In this third method you have to draw a Line. Can't remember exact method to draw a line, because using I was drawing triangles.
You said that you are creating GLSurfaceView using XML. So then you have to use .findViewById() to get it and then add Render.
Upvotes: 2