Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

splash full screen android

private fun setStatusBarGradiant(activity: Activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            val window: Window = activity.window
            val background = ContextCompat.getDrawable(this,R.drawable.splash_bg)
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
            window.statusBarColor = activity.resources.getColor(android.R.color.transparent)
            window.navigationBarColor = activity.resources.getColor(android.R.color.transparent)
            window.setBackgroundDrawable(background)
        }
    }
 
PREVIOUS NEXT
Tagged: #splash #full #screen #android
ADD COMMENT
Topic
Name
4+2 =