Last active
December 21, 2017 21:05
-
-
Save SabagRonen/9f93f22975dfe217f40d095808680df1 to your computer and use it in GitHub Desktop.
dagger android injector post main activity
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
class MainActivity : AppCompatActivity(), View { | |
@Inject lateinit var userAction: MainContract.UserAction | |
override fun onCreate(savedInstanceState: Bundle?) { | |
AndroidInjection.inject(this) | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
setSupportActionBar(toolbar) | |
fab.setOnClickListener { view -> | |
userAction.createTopic(this) | |
} | |
} | |
override fun showClickText() { | |
textView.setText("Fab was clicked") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment