Last active
April 19, 2017 10:25
-
-
Save MortimerGoro/f3223f06067a4b6368c92d81f41f4eb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
getWindow().takeSurface(null); | |
FrameLayout layout = new FrameLayout(this); | |
layout.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, | |
FrameLayout.LayoutParams.MATCH_PARENT)); | |
SurfaceView nativeSurface = new SurfaceView(this); | |
nativeSurface.getHolder().addCallback(this); | |
layout.addView(nativeSurface, new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, | |
FrameLayout.LayoutParams.MATCH_PARENT)); | |
setContentView(layout); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment