Hi, I hope I can explain myself and that you can help me, I have this class where you have a news bean property with news property. newsIconUrl that contains a URL and I need to show an image in an imageview with that url my problem is to pass that property to a global variable and then occupy it in the methods to show it in the imageview or another solution propose thanks in advance.
public class NoticiaDescripcion extends AppCompatActivity {
TextView tv1,tv2,tv3,tv4,tv5,tv6;
ImageView foto;
public String imagen;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.noticia_layout);
NewsBean noticia = (NewsBean)getIntent().getExtras().getSerializable("noticia");
Toast.makeText(getApplicationContext(), noticia.newsIconUrl, Toast.LENGTH_LONG).show();
tv1 = (TextView)findViewById(R.id.textView);
tv1.setText(noticia.newsTitle);
tv2 = (TextView)findViewById(R.id.pieFoto);
tv2.setText(noticia.pieFoto);
tv3 = (TextView)findViewById(R.id.lugar);
tv3.setText(noticia.lugar);
tv4 = (TextView)findViewById(R.id.autor);
tv4.setText(noticia.autorNota);
tv5 = (TextView)findViewById(R.id.seccion);
tv5.setText(noticia.newsSeccion);
tv6 = (TextView)findViewById(R.id.texto);
tv6.setText(noticia.texto);
foto = (ImageView)findViewById(R.id.imageView3);
}
}