0

How to create the activity full screen in android programmatically using kotlin.

Thanks!

Dev
  • 275
  • 4
  • 9
  • https://kotlinlang.org/docs/reference/android-overview.html – IntelliJ Amiya Jul 31 '17 at 05:39
  • 1
    You may want to take help from this thread https://stackoverflow.com/questions/2868047/fullscreen-activity-in-android if you want to convert it into kotlin then you can use converter or read what @IntelliJAmiya suggested – Ajay S Jul 31 '17 at 05:43
  • 1
    Wondering why this question is marked as duplicate and having so many down votes. The question redirected is not showing any code in kotlin lang... – Tupio Jan 22 '19 at 13:55

1 Answers1

12

Import Window packages

import android.view.Window
import android.view.WindowManager

Add your onCreate method

   override fun onCreate(savedInstanceState: Bundle?) {
    requestWindowFeature(Window.FEATURE_NO_TITLE)
    super.onCreate(savedInstanceState)     
    window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN)
   setContentView(R.layout.activity_test_test)
   }
sasikumar
  • 12,540
  • 3
  • 28
  • 48