catch illegal state exception on fragment transaction
This commit is contained in:
parent
51babc190a
commit
4f22859acf
|
@ -1167,10 +1167,14 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Fragment instantiateItem(@NonNull ViewGroup container, int position) {
|
public Fragment instantiateItem(@NonNull ViewGroup container, int position) {
|
||||||
Fragment fragment = getItem(position);
|
final Fragment fragment = getItem(position);
|
||||||
FragmentTransaction trans = fragmentManager.beginTransaction();
|
final FragmentTransaction trans = fragmentManager.beginTransaction();
|
||||||
trans.add(container.getId(), fragment, "fragment:" + position);
|
trans.add(container.getId(), fragment, "fragment:" + position);
|
||||||
trans.commit();
|
try {
|
||||||
|
trans.commit();
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
//ignore
|
||||||
|
}
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue