I got an Activity class that uses two other classes; one of them extending ImageView and one that extends BaseAdapter like so:
My ImageView class does some progresses when it is called and when I am starting it for the first time it does what I want it to. This is also the case if I press home button and then resumes. But for some reason it does not work if I resume from standby mode. (pressing the button on the phone that makes the screen dark) When I unlock the phone it crashes. It crashes on a nullPointerException, and from what I can read when I try to call getChildAt() on a GridView defined by the BaseAdapter.
Is it any way to make the app do the same as when I press the home button, as when I set the phone in standby mode? EDIT:
public MyCustomDefinedImageViewClass (Context context) {
super (context);
mContext = context;
MyCustomDefinedImageViewClass someThing =(MyCustomDefinedImageViewClass)gridViewIGetTheChildFrom.getChildAt(some int);
} This is what is causing my crash:
11-19 22:00:48.200: E/AndroidRuntime(6252): at my.package.name.MyCustomDefinedImageViewClass.<init>(MyCustomDefinedImageViewClass.java:57)
I do not think the code is helping to much and that was why I did not post it in the first place.