Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的 android 应用程序中使用“callOnClick()”
但它应该支持 min android API 8。
我如何模仿按钮单击联合国 API 8?
mSwitchBg是类型ImageView
mSwitchBg
ImageView
试试这个:
mSwitchBg.performClick();
它将从 API 级别 1 开始工作
尝试使用mSwitchBg.performClick()
mSwitchBg.performClick()