www.cftea.com

SharedPreferences putString 不能用 getInt 取,Intent 的 putExtra、getExtra 类似

ITPOW2017/11/19 11:10:12

如上 userId 是用的 putString(),我们取值时不能用 getInt() 取值,即使它是数字格式,也不能。

Intent 也类似,putExtra 传的参数是 String,就不能用 getIntExtra 取。

相关阅读

<<返回首页<<