0

I made a Ctrl+F search box with next ocurrence button, when i click next it scroll to next word, but the word is out of screen , if i scroll a few pixels down , you are able to see it.

so after the method find next is called i would like to scroll a little more so the highlighted word is visible.

mFindNextButton = (ImageButton) findViewById(R.id.find_next);
    mFindNextButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {

            mCurrentWebView.findNext(true);
            //scroll a little more()
        }
    });
AlanRubinoff
  • 385
  • 9
  • 30
  • This could help you: http://stackoverflow.com/questions/7561353/programmatically-scroll-to-a-specific-position-in-an-android-listview If not, provide more informations. – Prexx Oct 05 '15 at 12:58
  • i need to scroll from the current position , y pixels down – AlanRubinoff Oct 05 '15 at 13:03

1 Answers1

0

Maybe something like this:

scrollView.scrollTo(0, scrollView.getScrollY()+10); // Scroll down 10 more pixels
Prexx
  • 2,959
  • 5
  • 31
  • 48