1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

Merge branch 'master' into material

This commit is contained in:
Christophe Beyls 2015-01-18 23:50:51 +01:00
commit 3a66da1ce1

View file

@ -68,11 +68,28 @@ public class TrackScheduleActivity extends ActionBarActivity implements TrackSch
} else { } else {
trackScheduleListFragment = (TrackScheduleListFragment) fm.findFragmentById(R.id.schedule); trackScheduleListFragment = (TrackScheduleListFragment) fm.findFragmentById(R.id.schedule);
// Remove the room image DialogFragment when switching from dual pane to single pane mode // Cleanup after switching from dual pane to single pane mode
if (!isTabletLandscape) { if (!isTabletLandscape) {
FragmentTransaction ft = null;
Fragment eventDetailsFragment = fm.findFragmentById(R.id.event);
if (eventDetailsFragment != null) {
if (ft == null) {
ft = fm.beginTransaction();
}
ft.remove(eventDetailsFragment);
}
Fragment roomImageDialogFragment = fm.findFragmentByTag(RoomImageDialogFragment.TAG); Fragment roomImageDialogFragment = fm.findFragmentByTag(RoomImageDialogFragment.TAG);
if (roomImageDialogFragment != null) { if (roomImageDialogFragment != null) {
fm.beginTransaction().remove(roomImageDialogFragment).commit(); if (ft == null) {
ft = fm.beginTransaction();
}
ft.remove(roomImageDialogFragment);
}
if (ft != null) {
ft.commit();
} }
} }
} }