7

I am getting this error every time I press back from a child activity to a parent activity?

 W/ViewRootImpl: Cancelling event due to no window focus: MotionEvent { action=ACTION_CANCEL, actionButton=0, id[0]=0, x[0]=440.365, y[0]=825.35156, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1186212, downTime=1185113, deviceId=0, source=0x1002 } 

Anybody encountered such error?

jelmood jasser
  • 878
  • 1
  • 13
  • 30
  • 2
    That is not an error. The `W/` shows that this is a warning. Unless you are experiencing other problems that you feel are related to this message, I advise you to ignore it. – CommonsWare Jun 14 '16 at 23:14
  • @CommonsWare Thanks. This warning is kind of annoying so I thought there might be to fix the issue making it. – jelmood jasser Jun 14 '16 at 23:20
  • 3
    This is not a error, it's a (W)arning. Basically it says that the parent "view" (the view displayed in the parent activity) has not focus and its recieving the touch event. This is the normal behaviour, as you can see in the [documentation](https://developer.android.com/training/gestures/viewgroup.html). You can see this [post](http://stackoverflow.com/questions/6018309/action-cancel-while-touching) too. – William Ardila Jul 15 '16 at 18:18
  • @WilliamArdila Thank you for your answer. – jelmood jasser Jul 16 '16 at 05:32
  • 5
    I'm getting this with `startActivityForResult(new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI), 10);` The media picker shows, but the user is unable to make a selection because the click events are ignored ! – Someone Somewhere Sep 11 '16 at 16:50
  • Any solution for the same?? I am getting this on Android P and PopupMenu is not working. – Subhalaxmi Feb 14 '19 at 06:42
  • @CommonsWare, can you please help on the same?? Its warning but for a user the application is hanging stage. Its only observed in android P not in O. – Subhalaxmi Feb 14 '19 at 08:37
  • "a user the application is hanging stage" -- you might want to ask a separate Stack Overflow question with a [mcve] showing your code. In that question you can explain, in detail, what "is hanging stage" means. – CommonsWare Feb 14 '19 at 12:03
  • @CommonsWare, Please check https://stackoverflow.com/questions/54702989/in-android-p-dropping-event-due-to-no-window-focus-keyevent – Subhalaxmi Feb 15 '19 at 05:10

0 Answers0