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!
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!
I got the same problem as yours,and I tried portfoliobuilder's way but it didn't work. And then I just make some changes on my code,then it worked. I just set every instance of my button an OnlickListener interface instead of letting my Class inplements the View.OnClickListener~
button.setOnclickListener(new View.OnClickListener){
public void onClick(View v){//...
}
}
INSTEAD OF
public YourClass implements View.OnClickListener{...
public void OnClick(View v){
switch(v.getId()){
case://...
break;}}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With