Skip to content

Instantly share code, notes, and snippets.

View conradKE's full-sized avatar
🎨
Trying Something NEW

conrad wawire conradKE

🎨
Trying Something NEW
View GitHub Profile
@conradKE
conradKE / gist:d626cb25e461014fff25de934ad852f9
Last active December 22, 2020 11:04
Enable Disable button with Checkbox

#Enable Disable Button With Checkbox

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

           //get checkbox by id && button
          val ckb_terms = findViewById<CheckBox>(R.id.checkbox_terms)
          val btnStarted = findViewById<Button>(R.id.btn_getstarted)
@conradKE
conradKE / gist:76ce7e609b975f2af4967ae0f4b62743
Last active December 22, 2020 11:06
image behind status bar android

#add this on oncreate

            setWindowFlag(this, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, true)
        }

        if (Build.VERSION.SDK_INT >= 19) {
            window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
        }