In my new project i just added a image button with id imagebutton1. Should i describe about this in my MainActivity.java,If yes how to?
Asked
Active
Viewed 350 times
-2
-
2can you describe a little more about what all you have done upto now – Darish Mar 06 '16 at 08:52
-
I have got the answer, anyway thanks.. – App Maids Mar 06 '16 at 10:44
1 Answers
0
ِYou should make a reference to it in you MainActivity's onCreate function like below.
ImageView imageView = (ImageView) findViewById(R.id.imagebutton1);

Hosein Hamedi
- 322
- 4
- 16
-
you can also try this http://developer.android.com/reference/android/widget/ImageButton.html – Darish Mar 06 '16 at 08:57