在我integer.xml
我有整數資源不能返回正確的值
<integer name="minUNameLen">6</integer>
而且在我的代碼我:
if (uName.trim().length() < R.integer.minUNameLen) {
Toast.makeText(
Splash.this.getApplicationContext(),
"Should be Min "+R.integer.minUNameLen+" characters long",Toast.LENGTH_LONG).show();
但不是返回6
我得到2131165….
一個奇怪的號碼在我的碼。 有人可以告訴這裏有什麼問題嗎?
否則從hereResources.getInteger(R.integer.minUNameLen)
給我Cannot make a static reference to the non-static method getInteger(int) from the type Resources