i certainly know how to use it with the correct syntax by creating UiObjects, only thing is with the Appium driver i find it a bit different in terms of writing the code as ..my test fails while using the same here ,so asked for an example!
An example with UiAutomator
UiObject PatInfo = new UiObject(new UiSelector().className("android.widget.RelativeLayout").index(0).instance(0));
UiObject Enteries = PatInfo.getChild(new UiSelector().className("android.widget.LinearLayout").index(1));
UiObject PatName = Enteries.getChild(new UiSelector().className("android.widget.TextView").index(0).instance(0));
UiObject Patage = Enteries.getChild(new UiSelector().className("android.widget.TextView").index(1).instance(0));
UiObject Patsex = Enteries.getChild(new UiSelector().className("android.widget.TextView").index(2).instance(0));
UiObject PatRoom = Enteries.getChild(new UiSelector().className("android.widget.TextView").index(0).instance(1));
UiObject PatRoomLoc = Enteries.getChild(new UiSelector().className("android.widget.TextView").index(1).instance(1));
UiObject PatBed = Enteries.getChild(new UiSelector().className("android.widget.TextView").index(2).instance(1));
UiObject PatAvatar = PatInfo.getChild(new UiSelector().className("android.widget.ImageView").index(0));