global variable in kotlin android
creat a class file like
GlobalClass.kt
###
import android.app.Application
class GlobalClass:Application() {
var your_variable = "the variable"
}
###
then add it to AnroidManifest.xml
<application
android:name=".GlobalClass"
###
now in your pref activity
var gv_root = GlobalClass()
var gv_extract = gv_root.your_variable
###
PrintL.(gv_extract)
OutPut = the variable