diff --git a/example/reverse/android/README b/example/reverse/android/README deleted file mode 100644 index 2543952..0000000 --- a/example/reverse/android/README +++ /dev/null @@ -1 +0,0 @@ -Go reverse bind android app in 100% Go. diff --git a/example/reverse/android/build.gradle b/example/reverse/android/build.gradle deleted file mode 100644 index 8166a30..0000000 --- a/example/reverse/android/build.gradle +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2016 The Go Authors. All rights reserved. - * Use of this source code is governed by a BSD-style - * license that can be found in the LICENSE file. - */ - -buildscript { - repositories { - jcenter() - maven { - url "https://plugins.gradle.org/m2/" - } - } - dependencies { - classpath 'com.android.tools.build:gradle:2.2+' - classpath "gradle.plugin.org.golang.mobile.bind:gobindPlugin:0.2.8" - } -} - -apply plugin: 'com.android.application' - -repositories { - jcenter() -} - -android { - compileSdkVersion 24 - buildToolsVersion "24.0.3" - - defaultConfig { - applicationId "org.golang.example.reverse" - minSdkVersion 15 - targetSdkVersion 24 - versionCode 1 - versionName "1.0" - } - buildTypes { - release { - minifyEnabled false - } - } - dataBinding { - enabled = true - } -} - -dependencies { - compile 'com.android.support:appcompat-v7:24+' -} - -apply plugin: "org.golang.mobile.bind" - -gobind { - pkg = "golang.org/x/mobile/example/reverse/reverse" -} diff --git a/example/reverse/android/src/main/AndroidManifest.xml b/example/reverse/android/src/main/AndroidManifest.xml deleted file mode 100644 index 21604d8..0000000 --- a/example/reverse/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - diff --git a/example/reverse/android/src/main/res/layout/activity_main.xml b/example/reverse/android/src/main/res/layout/activity_main.xml deleted file mode 100644 index ee94e47..0000000 --- a/example/reverse/android/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/example/reverse/android/src/main/res/values/dimens.xml b/example/reverse/android/src/main/res/values/dimens.xml deleted file mode 100644 index cc0636b..0000000 --- a/example/reverse/android/src/main/res/values/dimens.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - 16dp - 16dp - diff --git a/example/reverse/reverse/reverse.go b/example/reverse/reverse/reverse.go deleted file mode 100644 index f6ce404..0000000 --- a/example/reverse/reverse/reverse.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package reverse implements an Android app in 100% Go. - -// +build android - -package reverse - -import ( - "Java/android/databinding/DataBindingUtil" - "Java/android/os" - "Java/android/support/v7/app" - gopkg "Java/reverse" - rlayout "Java/reverse/R/layout" - "Java/reverse/databinding" - "Java/reverse/databinding/ActivityMainBinding" -) - -type MainActivity struct { - app.AppCompatActivity - binding databinding.ActivityMainBinding -} - -func (a *MainActivity) OnCreate(this gopkg.MainActivity, b os.Bundle) { - this.Super().OnCreate(b) - db := DataBindingUtil.SetContentView(this, rlayout.Activity_main) - a.binding = ActivityMainBinding.Cast(db) - a.binding.SetAct(this) -} - -func (a *MainActivity) OnDestroy(this gopkg.MainActivity) { - a.binding = nil // break reference cycle - this.Super().OnDestroy() -} - -func (a *MainActivity) GetLabel() string { - return "Hello from Go!" -}