hello guys,
before asking question let me tell you about my class hierarchy. i have a Main
class with has onCreate()
method. in that method i have made the MapFile class' object.and called its readFile()
and readIndex()
methods. in readIndex()
method i call another class named MapTile
where i read the images tiles from my binary file and there i have to display my image.
now question is how can i display image without putting my code into onCreate(Bundle savedInstanceStare)
method.i am trying this way but on first line it gives me null pointer exception.
ImageView image = (ImageView) findViewById(android.R.id.icon);
Bitmap bMap = BitmapFactory.decodeByteArray(imageTile, 0, imageTile.length);
image.setImageBitmap(bMap);
thanks in Advance.