Android Open Source - NoiseBridge_General N B Web View Fragment






From Project

Back to project page NoiseBridge_General.

License

The source code is released under:

GPLv3.txt

If you think the Android project NoiseBridge_General listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.noysbrij.fragments;
//  w ww.  ja v a 2 s.  co  m
import android.os.*;
import android.support.v4.app.*;
import android.view.*;
import android.webkit.*;
import com.noysbrij.noisebridgeGeneral.*;
import java.lang.ref.*;
import android.support.v4.app.Fragment;
import org.apache.cordova.*;

public class NBWebViewFragment extends Fragment
{
  public static final String ARG_URL = "webUrl";

  @Override
  public View onCreateView(LayoutInflater inflater,
               ViewGroup container, Bundle savedInstanceState)
  {
    // The last two arguments ensure LayoutParams are inflated
    // properly.

    View rootView = inflater.inflate(
      R.layout.layout_webview, container, false);
    Bundle args = getArguments();
    WeakReference<WebView> webViewReference = new WeakReference<WebView>((CordovaWebView)rootView.findViewById(R.id.webview_window));
    webViewReference.get().getSettings().setJavaScriptEnabled(true);
    WebSettings webSettings = webViewReference.get().getSettings();
    webSettings.setJavaScriptEnabled(true);
    webSettings.setBuiltInZoomControls(false);
    webViewReference.get().requestFocusFromTouch();
    //    webViewRef.get().addJavascriptInterface(new jsInterface(getContext()), "Android");
    webViewReference.get().setWebChromeClient(new WebChromeClient());
    webViewReference.get().loadUrl(NoiseBridgeGeneral.websites[args.getInt(ARG_URL)]);
    return rootView;
  }
}




Java Source Code List

com.loopj.android.http.AsyncHttpClient.java
com.loopj.android.http.AsyncHttpRequest.java
com.loopj.android.http.AsyncHttpResponseHandler.java
com.loopj.android.http.BinaryHttpResponseHandler.java
com.loopj.android.http.JsonHttpResponseHandler.java
com.loopj.android.http.PersistentCookieStore.java
com.loopj.android.http.RequestParams.java
com.loopj.android.http.RetryHandler.java
com.loopj.android.http.SerializableCookie.java
com.loopj.android.http.SimpleMultipartEntity.java
com.loopj.android.http.SyncHttpClient.java
com.metamage.noisegate.Completion.java
com.metamage.noisegate.Data.java
com.metamage.noisegate.F.java
com.metamage.noisegate.GetAndDiscardUrlTask.java
com.metamage.noisegate.Key.java
com.metamage.noisegate.Noisegate.java
com.metamage.noisegate.Teletype.java
com.noysbrij.fragments.DatePickerFragment.java
com.noysbrij.fragments.JSInterface.java
com.noysbrij.fragments.ListViewFragment.java
com.noysbrij.fragments.NBWebViewFragment.java
com.noysbrij.fragments.TicketsArrayAdapter.java
com.noysbrij.fragments.TimePickerFragment.java
com.noysbrij.noisebridgeGeneral.NoiseBridgeGeneral.java
com.noysbrij.noisebridgeGeneral.ReadJson.java
com.noysbrij.noisebridgeGeneral.Ticket.java
com.noysbrij.noisebridgeGeneral.TicketsExpandableListAdapter.java
com.noysbrij.noisebridgeGeneral.Tickets.java