How can I have a smooth transition between pages on Android WebView - android

I tried to create an Android WebView App but the transition between pages is weird. It shows a fraction of second of a blank white screen before the next page loads.
I then tried this method to add a sliding animation effect for page loads. But it is worse, as after the "loading" Dialogue box, there is a fraction of a second of the previous page appearing before loading the next page. That creates a jumpy experience for users.
I just wonder how can I make page navigation on WebView to be smooth. I don't need anything fancy. I just want smoothness. The page transition on the mobile browser (e.g. Chrome) is quite smooth in comparison. It also has a blue progress bar indicating that the page is loading. That is perfect for me. I only need a transition that is comparable to the mobile browser experience.
Thank you very much in advance for all your contributions!

Related

How to implement resizeable fragment by user drag (not predefined transition animation)

Not sure how to explain this better, but it's mostly implemented by chat applications for Gallery picker fragments and alike. Best example is Google Allo, for which I posted GIF below. I'd like to know how is that implemented and how I could replicate the feature.
As you can see, the map fragment first transition animates from bottom to half of the screen, but then it can be dragged by finger to the top of the screen, when it actually fills the whole screen and even creates it's own toolbar. Most of all, I tested it, and this also works on API 16.

Clicking a textview in a Webview causes screen to jump and Webview scroll to become infinite

I am writing an app with the Salesforce Android SDK.
We have a custom website that is used for the login landing page that has a username and password field.
Clicking on the first field brings focus and keyboard as expected. Clicking on the second field (regardless of which is clicked first) causes the screen to jump up and down for half a second and then leaves the screen so that you can scroll infinitely, even beyond the background image. No matter how far you scroll the scrollbar is stuck at the top. However to scroll back up you have to scroll the same distance you scrolled down.
While this is from the LoginActivity from the Salesforce SDK, I have modified the file to show the action bar at the top.
What is causing this behavior and how can I make it stop, changing zoom controls in the webviews settings does not seem to help.
The same screen in iOS does not seem to have this same behavior.
Worth noting, the defect does not appear in the devices chrome browser.
The Class in Salesforce SDK
According to the Salesforce SDK
There is a ScrollView in a WebView. This shouldn't be necessary and may cause a problem such as the one you described. Changing the ScrollView to LinearLayout should fix the issue.

Page still scrollable when menu is open

I have my menu open, and I want to lock my regular webpage which is shifted to the side.
On "mm-opening" I am actually changing my body position to "static", and this does the trick for iPhone and certain Android devices!
However, on for example the Samsung Galaxy Note, while scrolling up and down on my mmenu, the regular webpage scrolls as well.
Any suggestions how to prevent this scrolling from happening?
Thank you.

Multiple WebViews with a single loading webview with Visibility == GONE makes another webview unresponsive

I am working on an Android browser using WebView(s), and to maintain tabs, multiple webviews are open in a single activity, with 1 always VISIBLE, the rest GONE.
However, when one webview is loading (via .loadUrl()), and then switch to another tab, the 2nd webview with a page already loaded is unresponsive in the sense that I can't click on any links in that until the first webview is loaded.
I can still scroll.
How can I prevent this from happening?
Thanks!

Scrolling hide effect like on Firefox and Chrome

Background
on Firefox and Chrome apps for Android, if the user scrolls down, the upper actionBar starts to disappear.
if the scrolling is fast enough , it starts an animation to finish the disappearing, but if not, it returns to its normal state.
and there is a similar effect for showing the action bar, only that it's for scrolling up.
The problem
I need to have the same ability to make a customized view that is on the top of the screen (looks a bit like an action bar but it's not).
a part of the view will always be visible, but a part of it will shrink like in the effect of chrome and firefox.
I've looked for libraries that allow such a thing but without any luck.
The question
How can I achieve this behavior?
My guess is that I need to use the scrolling listener of the adapterView , but then what?
I think this library can help, in the inner sample of "animation" :
https://github.com/LarsWerkman/QuickReturnListView
sadly i also use a customized pinterest-like listView, which doesn't report about scrolling (not states, but the real positions as you scroll). in fact it doesn't even extend from AdapterView.

Categories

Resources