Created
October 12, 2017 19:50
-
-
Save MartuPuri/0f4e9addbccdef2e5ff74d0b0b79f3a0 to your computer and use it in GitHub Desktop.
Base Android Project - BaseFragmentActivity
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
abstract class BaseFragmentActivity : AppCompatActivity() { | |
private var unbinder: Unbinder? = null | |
@get:LayoutRes protected abstract val contentView: Int | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(contentView) | |
unbinder = ButterKnife.bind(this) | |
} | |
override fun onDestroy() { | |
unbinder?.unbind() | |
super.onDestroy() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment