-
-
Save okanaydin/f70bd39e6f92ba377635ede6a8cd0b7c to your computer and use it in GitHub Desktop.
BaseActivity
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 BaseActivity<VB : ViewBinding> : AppCompatActivity() { | |
lateinit var binding: VB | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
binding = getViewBinding() | |
setContentView(binding.root) | |
} | |
abstract fun getViewBinding(): VB | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment