I have a problem with my app: in main activity I have fragments, and one of them is ChannelFragment. It includes RecyclerView with items in it.
When I click on RecyclerView's item, I want to start new Activity, but it works only with few items. When I click on the rest items, my activity goes to background after startActivityForResult(), but it doesn't call DetailActivity onCreate() method.
Here is my code:
if (!mListMode &&
(info.isNeedBuy() || info.isNeedDownload() || info.isNeedUpdate())) {
Intent intent = new Intent(mActivity.getApplicationContext(),
DetailActivity.class);
intent.putExtra("ItemInfo", info);
intent.putExtra("id", mId);
intent.putExtra("deviceType", mDeviceType);
startActivityForResult(intent, 1);}
@Override
public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == Activity.RESULT_OK) {
Iteminfo = data.getParcelableExtra("packageItemInfo");
download(info);
}
}