Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

android - ViewPostImeInputStage ACTION_DOWN

As I'm trying to debug my program, I can't figure out the error.

I have initialized two buttons and used .setOnClickListener on them. When the user clicks the buttons, they are supposed to see a debug message on LogCat. However, I keep seeing this message appear instead whenever I click the button, or if I click anywhere at all on the screen: ViewPostImeInputStage ACTION_DOWN.

Does anyone know what that message signifies, or if they a solution to my problem?

Thanks so much!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

ViewPostImeInputStage ACTION_DOWN is a bug that occurs stemming from the rare instance where your layout is rejected and you are no longer able to click on any clickable items, and what occurs instead is a ViewPostImeInputStage ACTION_DOWN with every button press (and no action). The solution for this is simple, wrap your layout content with a parent. So if you xml format was

<LinearLayout <---root layout
...
<!-- your content -->
</LinearLayout> <-- root layout end

change to

<FrameLayout <---root layout
   <LinearLayout <-- parent wrap start
   ...
<!-- your content -->
   </LinearLayout> <-- parent wrap end
</FrameLayout> <-- root layout end

This solution should resolve that conflict. Atleast this is what has worked for me. Cheers!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...