Maximus
Maximus

Reputation: 8431

GLSurfaceView in LinearLayout Follow Up Question

Please see this question I asked a few days ago: GLSurfaceView in LinearLayout

The answer that was given worked very well... but I would like to know if there is a more detailed explanation on why this works?

From my comments, "Working with other view types, and looking at the examples provided for LinearLayout, using wrap_content should work AFAIK. Can you provide any documentation links or further explanation?"

"Is the issue with the GLSurfaceView wanting too much space initially when wrap_content is used?"

Upvotes: 0

Views: 266

Answers (1)

Romain Guy
Romain Guy

Reputation: 98501

It's just because GLSurfaceView does not have the notion of "content." So when you tell a SurfaceView to have a height="wrap_content" it grabs all of the available space.

Upvotes: 1

Related Questions