代碼中使用 android.R.layout.simple_dropdown_item_1line 等系統資源 ID,字串過長難記,Alt+/ 無提示,R.layout 也找不到。
android.R.layout.simple_dropdown_item_1line)。android.R.layout.simple_ 觸發代碼補全,列出所有匹配資源。專案 res/layout/xxx.xml 編譯後自動生成 R.layout.xxx,同樣支援上述導航與補全。
善用 Ctrl+點擊 與補全,告別硬背長資源名。