Updated Android (markdown)

Hajime Hoshi 2016-07-08 02:11:04 +09:00
parent 32f52264c3
commit 848a4b2f97

@ -80,6 +80,8 @@ Use `gomobile bind`, generate an aar file and import this to your Android Studio
The below implementation implements a GLSurfaceView class. When the view's `onLayout` is called, the size of view is calculated and the game starts if the game doesn't start yet.
For an actual example, see [go-inovation's EbitenGLSurfaceView.java](https://github.com/hajimehoshi/go-inovation/blob/master/mobile/android/app/src/main/java/com/hajimehoshi/goinovation/EbitenGLSurfaceView.java).
```java
// ...
import com.example.yourgame
@ -134,6 +136,8 @@ If you want to center this view, you can set `android:layout_centerHorizontal="t
Implement a Renderer class to use for the GLSurfaceView class defined below.
For an actual example, see [go-inovation's EbitenGLSurfaceView.java](https://github.com/hajimehoshi/go-inovation/blob/master/mobile/android/app/src/main/java/com/hajimehoshi/goinovation/EbitenGLSurfaceView.java).
```java
private class EbitenRenderer implements Renderer {
@ -163,6 +167,8 @@ private class EbitenRenderer implements Renderer {
Call `mobile.UpdateTouchesOnAndroid` via your exported function.
For an actual example, see [go-inovation's EbitenGLSurfaceView.java](https://github.com/hajimehoshi/go-inovation/blob/master/mobile/android/app/src/main/java/com/hajimehoshi/goinovation/EbitenGLSurfaceView.java).
```java
public class EbitenGLSurfaceView extends GLSurfaceView {