Skip to content

Instantly share code, notes, and snippets.

@wellingtoncosta
Created January 24, 2019 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wellingtoncosta/06ee861aeb2d15b8fd7db97518fdae3b to your computer and use it in GitHub Desktop.
Save wellingtoncosta/06ee861aeb2d15b8fd7db97518fdae3b to your computer and use it in GitHub Desktop.
class FragmentTwo : Fragment() {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.fragment_fragment_two, container, false).apply {
this.back_to_fragment_one.setOnClickListener {
RxBus.instance.publish(MAIN_ACTIVITY_SUBJECT, FRAGMENT_ONE_TAG)
}
this.finish_app.setOnClickListener {
RxBus.instance.publish(MAIN_ACTIVITY_SUBJECT, FINISH_APP_TAG)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment