src/android/src/plugin/library/LuaLoader.java
/**
	 * The following Lua function has been called:  library.show( word )
	 * <p>
	 * Warning! This method is not called on the main thread.
	 * @param L Reference to the Lua state that the Lua function was called from.
	 * @return Returns the number of values to be returned by the library.show() function.
	 */
The following Lua function has been called:  library.show( word )

Warning. This method is not called on the main thread.
@param L Reference to the Lua state that the Lua function was called from.
@return Returns the number of values to be returned by the library.show() function.
The following Lua function has been called : library . show ( word ) Warning . This method is not called on the main thread . @param L Reference to the Lua state that the Lua function was called from . @return Returns the number of values to be returned by the library . show () function .
public int show(LuaState L) {
		CoronaActivity activity = CoronaEnvironment.getCoronaActivity();
		if (activity == null) {
			return 0;
		}
		String word = L.checkString( 1 );
		if ( null == word ) {
			word = "corona";
		}
		if (activity != null) {
			final String url = "http://dictionary.reference.com/browse/" + word;
			activity.runOnUiThread(new Runnable() {
				@Override
				public void run() {
					CoronaActivity activity = CoronaEnvironment.getCoronaActivity();
					if (activity == null) {
						return;
					}
					WebView view = new WebView(activity);
					view.setWebViewClient(new WebViewClient() {
						@Override
						public boolean shouldOverrideUrlLoading(WebView view, String url) {
							return false;
						}
					});
					activity.getOverlayView().addView(view);
					view.loadUrl( url );
				}
			} );
		}
		return 0;
	}
public int show ( LuaState L ) { CoronaActivity activity = CoronaEnvironment . getCoronaActivity ( ) ; if ( activity == null ) { return 0 ; } String word = L . checkString ( 1 ) ; if ( null == word ) { word = "corona" ; } if ( activity != null ) { final String url = "http://dictionary.reference.com/browse/" + word ; activity . runOnUiThread ( new Runnable ( ) { @ Override public void run ( ) { CoronaActivity activity = CoronaEnvironment . getCoronaActivity ( ) ; if ( activity == null ) { return ; } WebView view = new WebView ( activity ) ; view . setWebViewClient ( new WebViewClient ( ) { @ Override public boolean shouldOverrideUrlLoading ( WebView view , String url ) { return false ; } } ) ; activity . getOverlayView ( ) . addView ( view ) ; view . loadUrl ( url ) ; } } ) ; } return 0 ; }
The following Lua function has been called:  library.show( word )
 <p>
 Warning!
The following Lua function has been called : library . show ( word ) <p > Warning!
// Fetch a reference to the Corona activity. // Note: Will be null if the end-user has just backed out of the activity. // Fetch the first argument from the called Lua function. // Create web view on the main UI thread. // Fetch a reference to the Corona activity. // Note: Will be null if the end-user has just backed out of the activity. // Create and set up the web view. // Prevent redirect which causes an external browser to be launched // because some sites detect phone/tablet and redirect. // Display the web view.