Fragment identifier (#) in Uri not working correctly

939 Views Asked by At

I'm using the following code to open the browser to a specific section of a webpage:

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

So it loads the page in the browser but only stays at the right part of the page for a split second, then it jumps back to the very top of the page (the page is VERY long). Why is it doing this and how can I fix it??

Thanks a lot.

0

There are 0 best solutions below