im trying to embed a webview onto a Game Maker Studio Android app using a Java based extension.

I have two Java files. From the GMS app i call a function WebView_Create("http://google.com").

the function is in the first Java script:
Java Code:
package ${YYAndroidPackageName};
import ${YYAndroidPackageName}.RunnerActivity;
import ${YYAndroidPackageName}.R;
import com.yoyogames.runner.RunnerJNILib;

import java.io.File;
import android.content.Intent;

import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.view.View;


public class WebViewEmbed
	{
	public static String file1;
	
	public double WebView_Init()
		{
		file1 = "";
		return 1;
		}
		
	public String WebView_Get()
		{
		String file1_copy = "";
		if( file1 == "" )
			{
			return "";
			}
		else
			{
			file1_copy = file1;
			file1 = "";
			return file1_copy;
			}
		}
	
	public double WebView_Create(String url)
		{ 
		Intent webintent = new Intent( RunnerActivity.CurrentActivity, WebView2.class );
		WebView2.theurl=url;
		RunnerActivity.CurrentActivity.startActivity( webintent );
		return 1;
		}
	}
This is Webview2.java:
Java Code:
package ${YYAndroidPackageName};

import ${YYAndroidPackageName}.RunnerActivity;
import ${YYAndroidPackageName}.R;
import com.yoyogames.runner.RunnerJNILib;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.view.Window;

import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;

public class WebView2 extends Activity {
  public static String theurl;
  private WebView mWebView;
    
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
        
        //set activity title, header.
        //create some linear layouts for handling text and button
        
/*LinearLayout lLayout = new LinearLayout(this);
lLayout.setOrientation(LinearLayout.VERTICAL);
LayoutParams lLayoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
LayoutParams lLayoutParams2 = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lLayoutParams2.gravity = Gravity.CENTER;
LayoutParams lLayoutParams3 = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lLayoutParams3.gravity = Gravity.RIGHT;
setContentView(lLayout , lLayoutParams);*/

        this.setTitle("New Test Title");

        //getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        mWebView = new WebView(this);
        //mWebView.setScrollContainer(false);
        //mWebView.setBackgroundColor(Color.TRANSPARENT);
        
        mWebView.loadUrl(theurl);
        mWebView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
        
        this.setContentView(mWebView);
        //this.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        WindowManager.LayoutParams params = getWindow().getAttributes();  
        params.x = -0;  
        params.height = 300;  
        params.width = 640;  
        params.y = 0;  
        //params.dimAmount = 0.0F;
        this.getWindow().setAttributes(params); 
        
}
}
This creates a webview small centred on screen surrounded by black space, the app cant be used until i press back to escape from this new activity. So this is somewhat similar to what I actually want but I want the webview on the actual Game maker App screen not a new activity, It has to be embedded and need to reposition it. The app also needs to be function (the buttons etc..) while the webview is being shown.

Is it because we need to create a new layout on the Game Maker screen/activity and add the webview to that and not a new activity.

Its very confusion as im new to Java. I would learn it but apart from this il prob not use it much.

Would really appreciate help.