xlv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Intent intent=new Intent(getActivity(),SecondActivity.class);
i--;
intent.putExtra("xinwem",data.get(i).getUrl());
startActivity(intent);
}
});
--------------------------------------------------------------------------------
public class SecondActivity extends AppCompatActivity{
private WebView web;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.web);
web= (WebView) findViewById(R.id.web);
Intent intent=getIntent();
String xw=intent.getStringExtra("xinwem");
WebSettings settings=web.getSettings();
settings.setDefaultTextEncodingName("utf-8");
settings.setJavaScriptEnabled(true);
web.loadUrl(xw);
}
}