I have this class that loads a WebView with a constructor where I must pass a String that is the link to the page.
public class amazonWeb extends AppCompatActivity {
String url;
public amazonWeb(String url){
super();
this.url = url;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_amazon_web);
WebView webview = new WebView(this);
setContentView(webview);
webview.loadUrl(url);
}
}
And I call it from here. The problem is that I can not find where I can pass the parameter:
imgBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(v.getContext(), amazonWeb.class);
startActivity(intent);
}
});