• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Automatically scrolling a textview untill a certain point

Amanoo

Newbie
Mar 4, 2012
19
0
Hello. I am building an app that generates a certain amount of text in a TextView that is in turn contained inside of a ScrollView. Currently, when the text is generated and displayed, the user sees the beginning of the generated text. In my app, there will be one or two specific sentences in the whole text that will be most important, and I want the Views to center on those sentences first. The other data may or may not be important, and it is up to the user to decide whether it is or not. Text size, length and the location of the specific important part are highly variable.

To make what I want more clear: you might compare the function to this URL: Android (operating system) - Wikipedia, the free encyclopedia . When pressed, the user will immediately be sent to about halfway the article, to the Design part of it, to be precise. My app will not be a browser, but this function looks similar, you can scroll up and down, but it by default centers on the part "Design". An even better comparison would be with a search function. When you use CTRL+F and type something, most browsers, and many other programs as well, will immediately jump to the first location of your search. I need a similar "jump"-function.

Can anyone help me with this?
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones