I’ve create a WebView in the main class of an activity, then I’ve a new class but I can’t modify any property of the webView created in the main class, what are the steps for the proper update?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In this situation i would probably create an interface. Then in the class that extends WebView or whatnot, you could call loadUrl from the interface. Then from another class you could call the interface method inside of the class that extends WebView. If you need an example let me know and i can provide one.
More on interfaces:
Oracle Documentation on Interfaces
Oracle Documentation on how to implement intefaces