How to access? element on pop up native form - Native android app

How to access element in a native pop up form? In my native app there is a button for login. When this button is pressed it brings a native form that shows username password fields. I am able to see these in uiautomatorviewer tool. But I I do not know how to access these fields. Can someone help me out? I am trying this on Android Nougat platform with Appium Java or Python.