How to Instantiate a New ImageView

ImageView was added in API Level 1

1. Declare an ImageView.

2. After you declare the ImageView object, add this line below to instantiate it. This will instantiate a new ImageView named myImageView.

myImageView = new ImageView(this);

3. Compile and run!