mWebView.setListener(this,this); error:- can not resolve method.
See original GitHub issue// in the androidx Fragment (androidx.fragment.app.Fragment)
mWebView.setListener(this,this);
give error… and also how to handle OnBackpress in the Fragment? seems you didn’t mention that. i was trying to Achive mWebView.canGoBack(); but it’s didn’t work.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// This callback will only be called when MyFragment is at least Started.
OnBackPressedCallback callback = new OnBackPressedCallback(true /* enabled by default */) {
@Override
public void handleOnBackPressed() {
// Handle the back button event
mWebView.canGoBack();
}
};
requireActivity().getOnBackPressedDispatcher().addCallback(this, callback);
callback.isEnabled();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_feed2, container, false);
String data = Prefs.getString("WEB", defaulturl);
mWebView = (AdvancedWebView) view.findViewById(R.id.webview);
mWebView.setListener(this,this);
mWebView.setMixedContentAllowed(true);
mWebView.loadUrl(data);
return view;
}
if possible then add a sample app with Fragment in Source Folder in the Master branch.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Cannot resolve method 'setWebChromeClient(anonymous ...
I'm getting the following error message: Cannot resolve method 'setWebChromeClient(anonymous android.webkit.WebChromeClient) . If it will help ...
Read more >delight-im - Bountysource
my JavaScript Interface don't work on this webview :( ... mWebView.setListener(this,this); error:- can not resolve method. $ 0.
Read more >How to Fix:Cannot resolve symbol webView on Android Studio
Create a webview and solve webview error in android studio cannot resolve symbol error in Android StudioHow to Fix: Cannot resolve symbol ......
Read more >Diff - platform/frameworks/base - Google Git
WearableExtender setAvailableOffline(boolean); method public android.app. ... </p> + * + * <p>It is not an error to include output streams with the same ......
Read more >Android App Development for Beginners | Maid Rondić
Learn the basics of Android App Development with java. I will teach you how to build android application by using android studio and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mhemon will there be an update of this library?
@ocram plz tell us, is there any update Coming up.