Add component arrangment question


#1

How to add a new component add an existent layout ?

@SimpleFunction(
description = “”)
public void addcomponenttolayout(LinearLayout layout,String url) {
layout.setOrientation(android.widget.LinearLayout.VERTICAL);
LinearLayout lt= (LinearLayout) layout.viewLayout.getLayoutManager();
setContentView(layout);
WebView webView = new WebView(context);

// WebView wb= (WebView) webviewer.getView();
// wb.loadUrl(url);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadData(url, “text/html”, “utf-8”);
lt.addView(webView, new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
));
}