Uri fragment id (#) not working correctly

I use the following code to open a browser for a specific section of a web page:

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://something.somewhere.com/baggage_fees.html#_" + twoLetterCode; startActivity(Intent.createChooser(browserIntent, "Select browser:")); 

Thus, it loads the page in the browser, but remains only on the right side of the page for a second, and then returns to the very top of the page (the page is VERY long). Why is this done and how can I fix it?

Many thanks.

+6
source share

Source: https://habr.com/ru/post/906706/


All Articles