ImageView Example

Package

android.widget.ImageView

Layout

<ImageView
    android:id="@+id/image_view"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@android:drawable/sym_action_call"/>

Activity or Fragment

public class TestActivity extends Activity {
    private ImageView mImageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_activity);

        mImageView = (ImageView)findViewById(R.id.image_view);
        mImageView.setImageResource(android.R.drawable.sym_action_email);
    }
    ...
}

Scale

Download

ImageViewExample.zip