Share to EffectHub.com

You can earn money or coins from your share:)

Tips: you can use Sparticle for uploading away3D effects.

Tips: you can download Sparticle for uploading effects.

Tips: The ActionScript editor is supporting Away3D, Starling, Dragonbones and Flex frameworks.

Tips: paste the web page URL then click button:)

EffectHub.com: Your Best Source for Gaming
Login    or

DialogFragment with a WebView

import android.content.DialogInterface;import android.net.Uri;import android.os.Bundle;import android.support.v4.app.DialogFragment;import android.util.Log;import android.view.LayoutInflater;import android.view.View;import android.view.ViewGroup;import android.webkit.WebChromeClient;import android.webkit.WebView;import android.webkit.WebViewClient;import android.widget.Toast;import com.adobe.mobile_playpanel.R;public class MyDialogFragment extends DialogFragment {    public static MyDialogFragment newInstance() {    return new MyDialogFragment();    }        WebView wv=null;        public View onCreateView(LayoutInflater inflater, ViewGroup container,            Bundle savedInstanceState){    View v=inflater.inflate(R.layout.fragment_login, container,false);    wv=(WebView)v.findViewById(R.id.frag_webView);    initWebView(wv);        wv.setWebChromeClient(new WebChromeClient()    {            @Override            public void onProgressChanged(WebView view, int newProgress) {                // super.onProgressChanged(view, newProgress);                getActivity().setProgress(newProgress*1000);            }    });    return v;    }        public void onActivityCreated(Bundle savedInstanceState) {    super.onActivityCreated(savedInstanceState);    wv.loadUrl("http://google.com");    }        private void initWebView(WebView wv)    {    wv.getSettings().setJavaScriptEnabled(true);    wv.clearCache(true);      wv.setScrollBarStyle(0);    wv.setWebViewClient(new MyWebViewClient());    }            private class MyWebViewClient extends WebViewClient    {        public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {            // super.onReceivedError(view, errorCode, description, failingUrl);            Log.e("MyWebViewClient", failingUrl);        };        @Override        public boolean shouldOverrideUrlLoading(WebView view, String url) {            Log.d("MyWebViewClient",url);            return super.shouldOverrideUrlLoading(view, url);        }    }        public void onDismiss (DialogInterface dialog)    {    wv.stopLoading();        Log.e("MyDialogFragment", "onDismiss");    //super.onDismiss(dialog);    }        }


...

You must Sign up as a member of Effecthub to view the content.

8344 views    6 comments

You must Sign up as a member of Effecthub to join the conversation.

Join Effecthub.com


Or Login with Your Email Address:

Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: views/footer.php

Line Number: 6

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/topic.php

Line Number: 21

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/topic.php

Line Number: 85