-2

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?

App Maids
  • 13
  • 4

1 Answers1

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