开发者

Why the editText cannot input after I add password.setText("") in onResume function?

I made an Android application. One of the parts is login. In this activity, I have a EditText which name is password. After press the login button, it will open a new activity to prepare to do something else. If validate the password fail on the server, I will finish() the new activity and back to the old one. I want to clear the password which have been entered. so I use password.setText("") in the onResume() method.

But if I type wrong password for several times, as you see, the activity open and close several times, the EditText password cannot input anything until I close the activity and open it again.

here is the logcat info:

05-31 16:11:30.067: VERBOSE/WindowManager(2335): Remove Window{47cd7058 com.nationz.szt/com.nationz.szt.ChargeFromRelate2 paused=false}: mSurface=Surface(name=com.nationz.szt/com.nationz.szt.ChargeFromRelate2, identity=691) mExiting=false isAnimating=false app-animation=null inPendingTransaction=false mDisplayFrozen=false
05-31 16:11:30.067: ERROR/WindowManager(2335): return in removeWindowLocked
05-31 16:11:33.657: VERBOSE/WindowManager(2335): Remove Window{478bad38 com.nationz.szt/com.nationz.szt.ChargeFromRelate2 paused=true}: mSurface=Surface(name=com.nationz.szt/com.nationz.szt.ChargeFromRelate2, identity=693) mExiting=false isAnimating=true app-animation=com.android.server.WindowManagerService$DummyAnimation@477d7c40 inPendingTransaction=true mDisplayFrozen=false
05-31 16:11:33.657: ERROR/WindowManager(2335): return in removeWindowLocked
05-31 16:11:33.677: INFO/[POST_RESELECT](5092): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@401245a0,-1,0,-1,0)
05-31 16:11:33.677: INFO/[POST_RESELECT](5092): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4014c1e0,-1,0,-1,0)
05-31 16:11:33.677: DEBUG/InputManagerService(2335): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@47c98a78 (uid=10094 pid=5092)
05-31 16:11:33.707: DEBUG/InputManagerService(2335开发者_如何学C): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@47844ae8
05-31 16:11:33.777: VERBOSE/WindowManager(2335): Remove Window{47bc8f88 com.nationz.szt/com.nationz.szt.ChargeFromRelate2 paused=false}: mSurface=Surface(name=com.nationz.szt/com.nationz.szt.ChargeFromRelate2, identity=692) mExiting=true isAnimating=true app-animation=android.view.animation.AnimationSet@479a2608 inPendingTransaction=false mDisplayFrozen=false
05-31 16:11:33.777: ERROR/WindowManager(2335): return in removeWindowLocked
05-31 16:11:34.557: DEBUG/FriendStreamWidgetView(2483): handleReceivedIntent SIP isCurrentlyVisisble=true
05-31 16:11:35.439: WARN/IInputConnectionWrapper(5092): beginBatchEdit on inactive InputConnection
05-31 16:11:35.439: WARN/IInputConnectionWrapper(5092): commitText on inactive InputConnection
05-31 16:11:35.439: WARN/IInputConnectionWrapper(5092): InputConnection = null, active client = true
05-31 16:11:35.439: WARN/IInputConnectionWrapper(5092): endBatchEdit on inactive InputConnection
05-31 16:11:36.187: WARN/IInputConnectionWrapper(5092): beginBatchEdit on inactive InputConnection
05-31 16:11:36.187: WARN/IInputConnectionWrapper(5092): commitText on inactive InputConnection
05-31 16:11:36.187: WARN/IInputConnectionWrapper(5092): InputConnection = null, active client = true
05-31 16:11:36.187: WARN/IInputConnectionWrapper(5092): endBatchEdit on inactive InputConnection
05-31 16:11:36.547: WARN/IInputConnectionWrapper(5092): beginBatchEdit on inactive InputConnection
05-31 16:11:36.547: WARN/IInputConnectionWrapper(5092): commitText on inactive InputConnection

Anybody know why? BTW: If I remove the password.setText("") part. it will works fine.


This looks like it might be related to what you're seeing.

http://code.google.com/p/android/issues/detail?id=17508

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜