tags:

views:

40

answers:

1

hello, how can i get a variable on the imageview that i have defined in a layout.xml in the code?

thanks!

+2  A: 

Give the ImageView an id and then use the findViewById() method

 ImageView view = findViewById(R.id.someid);

Note, the findViewById() method has to be called from a Context object (Activity, etc)

Chris Thompson