cost 208 ms
edittext.setOnKeyListener(new View.OnKeyListener) 的问题 - Problem with edittext.setOnKeyListener(new View.OnKeyListener)

我正在学习使用 Android Studio,对于我的第一个应用程序,我正在做 Tic Tac Toe。 我有一个活动,玩家可以写下它的名字,以便稍后显示他的积分。 我想实现按 ENTER 执行它的可能性,而不是必须按按钮“完成”,但我收到错误“无法解析符号 setOnKeyListener”(还有 ...

为什么不能在btn.setonclicklistener方法内调用方法 - why can't call a method inside the btn.setonclicklistener method

当我尝试在setonclicklistener中调用loadSound方法时,声音没有出现,但是当我在onCreateView或onStart方法中调用它时,声音出现了,并且一切正常。 有什么问题 ? 仅当按下按钮时,有什么方法可以调用方法吗? 甚至我在setonclicklisten ...


排序:
质量:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM