I have a Gridview with images in Fragment on my FragmentActivity.
Gridview onItemClick I call Activity
Intent intent = new Intent(getSherlockActivity(), ViewActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("PREVIEW_IMG_ID", imagesIDs.get(pos));
startActivity(intent);
On first ViewActivity backpressed all seems normal but second click Gridview onItemClick and ViewActivity backpressed returns error when I set Strict mode:
StrictMode ViewActivity; instances=2; limit=1 and app died.
Why that happen? Can I prevent error or just ignore ?
View Activity
import android.app.Activity;
import android.os.Bundle;
import com.bugexplorer.wallpapers.R;
public class ViewActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view);
}
}