Skip to content
Permalink
Browse files

GOLANG works

  • Loading branch information...
Roman Tronenko
Roman Tronenko committed Mar 9, 2017
1 parent 81db734 commit 6fa5de7147a48e4b23392a3863bee70049072c5a
Showing with 34 additions and 9 deletions.
  1. +1 −1 .idea/misc.xml
  2. +24 −0 app/build.gradle
  3. +9 −8 app/src/main/java/tattoo/gogo/app/gogo_android/MainActivityFragment.java
@@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
@@ -1,19 +1,43 @@
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://plugins.gradle.org/m2/"}
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath "gradle.plugin.org.golang.mobile.bind:gobindPlugin:0.2.8"
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: "org.golang.mobile.bind"


repositories {
maven { url 'https://maven.fabric.io/public' }
}

gobind {
pkg = "golang.org/x/mobile/example/bind/hello"

GOPATH = "/Users/delirium/go"

// Optional path to the go executable.
GO = "/Users/delirium/go/bin/go"

// Optionally, set the absolute path to the gomobile binary.
GOMOBILE = "/Users/delirium/go/bin/gomobile"

// Pass extra parameters to command line. Optional.
// GOMOBILEFLAGS="-javapkg my.java.package"

// Absolute path to the gobind binary. Optional.
GOBIND="/Users/delirium/go/bin/gobind"

// Optional list of architectures. Defaults to all supported architectures.
// GOARCH="arm amd64"
}

android {
compileSdkVersion 25
@@ -6,11 +6,13 @@
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.GlideBitmapDrawable;
@@ -19,6 +21,7 @@

import butterknife.BindView;
import butterknife.ButterKnife;
import hello.Hello;
import tattoo.gogo.app.gogo_android.utils.CircleTransform;


@@ -28,14 +31,11 @@
public class MainActivityFragment extends Fragment {

private int countFabTapped;
@BindView(R.id.iv_doge)
ImageView ivDoge;
@BindView(R.id.iv_artist_gogo)
ImageView ivArtistGogo;
@BindView(R.id.iv_artist_aid)
ImageView ivArtistAid;
@BindView(R.id.iv_artist_xizi)
ImageView ivArtistXizi;
@BindView(R.id.iv_doge) ImageView ivDoge;
@BindView(R.id.iv_artist_gogo) ImageView ivArtistGogo;
@BindView(R.id.iv_artist_aid) ImageView ivArtistAid;
@BindView(R.id.iv_artist_xizi) ImageView ivArtistXizi;
@BindView(R.id.tv_description) TextView tvDescription;

private View flNewTattoo;
private FloatingActionButton fab;
@@ -100,6 +100,7 @@ public void onAnimationRepeat(Animation animation) {
loadArtist(ivArtistAid, "http://gogo.tattoo/aid/images/aid.png", "aid");
loadArtist(ivArtistXizi, "http://gogo.tattoo/xizi/images/xizi.jpg", "xizi");

tvDescription.setText(Hello.greetings("This is a greeting from golang, WOW!"));

}

0 comments on commit 6fa5de7

Please sign in to comment.
You can’t perform that action at this time.