例如想要强转一个textView
在AS中输入
- findViewById(R.id.text).cast
findViewById(R.id.text).cast
按下tab键,编辑器自动变成
- (() findViewById(R.id.text))
(() findViewById(R.id.text))
输入完类型按回车,光标自动回到行尾
- ((TextView) findViewById(R.id.text)).field
((TextView) findViewById(R.id.text)).field
回车,输入这个Textview的变量名,AS自动生成一个Private变量