Use a separate TextView
to store the link like:
String enNyhet = null;
String mLink = null
enNyhet = b.getString("title") + "\n\n" + b.getString("pubdate") + "\n\n" + b.getString("description") + "\n";
mLink = b.getString("link");
TextView db = (TextView) findViewById(R.id.nyhet);
db.setText(enNyhet);
TextView link = (TextView) findViewById(R.id.link);
link.setText(mLink);
Now add a onClickListener
to the link TextView
:
link.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Set the intent to your webview activity and put the string link as extra.
Intent intent = new Intent(this, WebbVy.class);
intent.putExtra("LINK", mLink);
startActivity(intent);
}
});
Then in your webview activity you get the string from the intent and load it in the webview.
Hope it helps!