Created
September 3, 2014 05:09
-
-
Save manijshrestha/a084447d11fd3b84b700 to your computer and use it in GitHub Desktop.
Groovy-Android-DroidActivity
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
package com.manijshrestha.groovydroidexample | |
import android.app.Activity | |
import android.os.Bundle | |
import android.widget.TextView | |
import groovy.transform.CompileStatic | |
@CompileStatic | |
public class DroidActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_droid); | |
String messageText = "Hello Groovy!"; | |
def message = findViewById(R.id.message) as TextView | |
message.text = messageText; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment