question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
developerGMcommented, Jun 17, 2021

@mhemon will there be an update of this library?

0reactions
mhemoncommented, Jun 17, 2021

@ocram plz tell us, is there any update Coming up.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found