Created
August 15, 2020 06:51
-
-
Save ayushmaniac/407342068aa78ae34aa6f6415c2258cf to your computer and use it in GitHub Desktop.
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 : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(provideLayoutId()) | |
setupView(savedInstanceState) | |
} | |
@LayoutRes | |
protected abstract fun provideLayoutId(): Int | |
protected abstract fun setupView(savedInstanceState: Bundle?) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment