SEOClerks

I need to embed a Webview object into app using Java

I need to embed a Webview object into app using Java

I am making an extension for a Game Maker android app.

The extension uses Java.

Now I found a way to create a webview on the app screen, but a problem is it takes the whole screen up.

What I want is for example create a 320x50px webview on the app screen so we can still see the game in the app. We also want a way to then remove the webview from screen.

Here is the current code I am experimenting with:

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;

public class WebView2 extends RunnerActivity {
public static String theurl;
private WebView mWebView;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

/* WindowManager.LayoutParams params = getWindow().getAttributes();
params.x = 10;
params.height = 100;
params.width = 300;
params.y = 200;

this.getWindow().setAttributes(params);*/

mWebView = new WebView(RunnerActivity.CurrentActivity);
mWebView.setBackgroundColor(0x00000000);
mWebView.setWebViewClient(new WebViewClient());
RelativeLayout.LayoutParams webViewParams= new RelativeLayout.LayoutParams(320, 240);
webViewParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);//CENTER_IN_PARENT);



RelativeLayout l = new RelativeLayout(RunnerActivity.CurrentActivity);
l.addView(mWebView, webViewParams);

//getWindow().requestFeature(Window.FEATURE_NO_TITLE);
//mWebView = new WebView(RunnerActivity.CurrentActivity);
mWebView.setScrollContainer(false);


mWebView.loadUrl(theurl);
/*mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});*/


setContentView(l);
//this.setContentView(mWebView);
}
}





To help you must be good with Java, and if possible Game Maker


Requirements

Java


Skills Required

Ios Androiddevelop Wordpress Websites Woocommerce

Bids

hello
greeting of the day
we would like to inform you that our team of specialists builds and develops the most engaging games to be played on ios platform and also the most sophisticated iphone applications. we provide development for mobile applications on android platform as well.
managed a team at an award-winning interactive agency.

hello
greeting of the day
we would like to inform you that our team of specialists builds and develops the most engaging games to be played on ios platform and also the most sophisticated iphone applications. we provide development for mobile applications on android platform as well.
managed a team at an award-winning interactive agency.

Created 3 years ago in Programming

Other jobs by TheRealRio