Android: SurfaceView resolution is lower than screen resolution -


i following tutorial on http://obviam.net/index.php/a-very-basic-the-game-loop-for-android/ make android game loop. works well, except surfaceview 526x320 while phone 1920x1080 resolution. can me fix issue?

first, tutorial overrides ondraw() when rendering onto surfaceview surface, recipe trouble. don't that. don't extend surfaceview unless want draw on view surface. (its render thread may continue run while app isn't in foreground... maybe should find tutorial understands surfaceview better.)

second, surfaceview's surface allowed different size. can set (reasonable) size want setfixedsize() method.

the default size of surfaceview should match size of view. if have full-screen view, surface size of screen.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -