我想在我的应用程序中启用深色主题,但之前可以正常工作的代码现在无法正常工作
重写onCreatePreferences(savedInstanceState:Bundle ?, rootKey:String?){ setPreferencesFromResource(R.xml.preference_screen,rootKey) preferenceHelper = PreferenceHelper(上下文!!)
#!/usr/bin/expect -f
source home/tests/library.tcl
set openapp [runapp]
eval spawn $openapp
set id $spawn_id
login
puts [exec home/tests/testsuite/abc $id]
expect eof
重写onCreatePreferences(savedInstanceState:Bundle ?, rootKey:String?){ setPreferencesFromResource(R.xml.preference_screen,rootKey) preferenceHelper = PreferenceHelper(上下文!!)
#!/usr/bin/expect -f
sourcehome/tests/library.tcl
puts 2ndscript
set bbb [lindex $argv 0]
puts $bbb
send -i $bbb "t\r"
expect eof
val switchPreferenceCompat = findPreference(getString(R.string.key_darkTheme))
此行显示错误