Search code examples
androidkotlinkotlin-extension

Check if my Activity is in MultiWindowMode or not using Kotlin


How to check if my activity is in MultiWindowMode or not.

I have used Myactivity.isInMultiWindowMode() and MYactivity.isInPictureInPictureMode(), but showing error

Do I have to extend something as MultiWindow is not recognizing

I have gone through other post regarding multiwindow but no hope


Solution

  • the problem was that you should precede isInMultiWindowMode() & isInPictureInPictureMode() with activity like getActivity() in android.