Skip to content

Instantly share code, notes, and snippets.

@navi25
Created December 24, 2018 06:19
Show Gist options
  • Save navi25/be3eb52fd76f1c5f214ac8765ab9a1d3 to your computer and use it in GitHub Desktop.
Save navi25/be3eb52fd76f1c5f214ac8765ab9a1d3 to your computer and use it in GitHub Desktop.
A MainActivity class for consuming our simple MerryAnnotation processor
package io.navendra.merryannotation
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import io.navendra.annotation.GreetingGenerator
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
val TAG = MainActivity::class.java.simpleName
@GreetingGenerator
class Santa
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val textView = greetingView
textView.text = Generated_Santa().greeting()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment