Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebViewClient class overview?

WebView has an overview, which helps understand the purpose, expected flow and how to use it, but WebViewClient, for some reason, doesn't have an overview.

What is the purpose of this class? Why have a separate class for the methods it contains? What is the typical/normal sequence of events in its lifetime?

like image 677
an00b Avatar asked Jun 18 '26 12:06

an00b


1 Answers

What is the purpose of this class?

It allows your code to be informed of various events in the lifecycle of an associated WebView.

Why have a separate class for the methods it contains?

It is a listener interface that you can attach to WebView, so you can get events through composition instead of inheritance.

like image 168
CommonsWare Avatar answered Jun 21 '26 03:06

CommonsWare



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!