2
How do I send an Activity url to another with different click actions (multiple buttons)? I tried to use intent.putextra
but I can’t recur the urls of the other buttons, in case I’m using two Activity the second this with webview ran with loadurl, but as I said I can only make it work one button, and I don’t know how to receive others in the same Activity.
thus sending:
Home.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(inicio.this,INSMainActivity.class);
intent.putExtra("hiphop", "https://m.youtube.com/channel/UCUnSTiCHiHgZA9NQUG6lZkQ");
startActivity(intent);
}
});
receiving:
String url = getIntent().getExtras().getString("hiphop");
youtubeView = (WebView) findViewById(R.id.youtube_view);
youtubeView.loadUrl(url);
As seen in the code I am trying to load genres from the first Activity.
I’ll test like this
– Marcos Freitas
@Anything just say what comes up that I’m trying to check
– Matheus Rohwedder