[已解决](只是简单地完成整个代码,做了一些小改动,现在工作正常。)
我一直遇到这个错误的问题:
W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
我做了一个简单的数学游戏,我设置了3个不同的难度阶段。数学游戏的工作原理如你得到如下公式:3 * 7 = __
,然后玩家填写空字段并按下[CORRECT]-button
,这将告诉玩家它是正确还是错误。积分将被添加到该人正确的分数时间。从一开始我只编写了一个EASY-difficulty阶段编码,并且此后也将代码添加到MEDIUM-difficulty阶段(包含相同的布局和编码,但是使用更难的方程)。当我进入EASY-difficulty阶段并解决一个等式时,我突然从EasyActivity被抛出到PlayActivity。
在创建MEDIUM阶段之前,我已经(并且仍然存在)此问题。对于isntants,如果我在PlayActivity的onCreate或onClick中尝试使用if
- 语句,当我进入Easy-stage并尝试求解方程式时,它会表现相同。任何想法为什么会这样?
我的App结构如何:
(a) MainActivity --> here I have a start button which leads to the Menu
(b) MenuActivity --> is my Menu, where following buttons are found:
(b.1) Play --> leads to the game (PlayActivity), with following buttons:
- EasyActivity = easy difficulty (upon press leads to the game)
- MediumActivity = medium difficulty (upon press leads to the game)
- HardActivity = hard difficulty stage (not coded yet)
(b.2) High Score --> leads to the High Score (HighScoreActiviy)
(b.3) Help --> leads to the game information (HelpActivity)