While users have been able to connect an XBox One controller to their Android device for a few years, the process has always been a bit buggy. A Google developer announced yesterday that the bug should be fixed in Android 9.0 Pie, which will have native support for XBox One controllers.
https://www.notebookcheck.net/Android-Pie-now-natively-supports-XBox-One-controllers.324566.0.html