Unable to Scroll intoview

im trying to scroll into view of them item in the menu but seems appium see the element but not scrolling to it, if the item is in the visible part of of the menu appium will select it, if the item is not in the visible part of the menu in the screen appium will detect it but will not scroll to it

here what i have tried so far

@AndroidFindBy(uiAutomator = “new UiScrollable(new UiSelector().scrollable(true).instance(0))”
+ “.scrollIntoView(new UiSelector().textContains(“Civil”).instance(0))”)
private MobileElement menuItem;

@AndroidFindBy(uiAutomator =
        "new UiScrollable(new UiSelector().className(\"android.view.View\").index(0).instance(24)).getChildByText("
                + "new UiSelector().className(\"android.widget.Button\"), \"Civil\")")
private MobileElement menuItem;

@AndroidFindBy(uiAutomator =
        "new UiScrollable(new UiSelector().className(\"android.view.View\").index(0).instance(24)).scrollIntoView("
                + "new UiSelector().className(\"android.widget.Button\"), \"Civil\")")
private MobileElement menuItem;    **// doesnt work at all** 

Note the app is hybrid not native

@Aleksei do u have any other suggested solution

-> Collect all elements from a list with scroll

im not quite sure how do u mean, i think im doing what you has referred
this element that i highlighted .className(“android.view.View”).index(0).instance(24)

is the element that contains all item in the list, after that i stated
.getChildByText("
+ “new UiSelector().className(“android.widget.Button”), “Civil”)”)
to get the element by text from the class

maybe i should also specify the class index since all item have same class but with different text

i mean your code not correct. you writing incorrectly “UiSelector” - and you should see in appium logs that locator you trying to search not correct. example i send is different.

@Aleksei
i have tried the following method
@AndroidFindBy(uiAutomator = “new UiScrollable(new UiSelector().className(“android.view.View”).index(0).instance(23)).scrollIntoView(”
+ “new UiSelector().className(“android.widget.Button”).index(20).textContains(“Computer”))”)
MobileElement offenseItem;

and the method u suggested, still same behavior appium sees the element without scrolling to it
and when i change index “20” to something else that doesnt have text contains “Computer” appium will start to scroll however it doesn’t exist in dom, if element exists it will see it but there is not any clicking event will happen test will continue to next step , which means that he clicked on it
im not sure whats the problem i have tried these methods many times with different application they were working fine, it seems its appium issue with hybrid application