diff options
Diffstat (limited to 'android/sdremote/src')
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java index f8769f32ae38..f12b3d8ed048 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java @@ -119,6 +119,10 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn } private void setUpSlideNotes(int aSlideIndex) { + if (!isSlideNotesLayoutAvailable()) { + return; + } + if (areSlideNotesAvailable(aSlideIndex)) { showSlideNotes(aSlideIndex); } @@ -127,6 +131,12 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn } } + private boolean isSlideNotesLayoutAvailable() { + ViewGroup aSlideNotesLayout = (ViewGroup) getView().findViewById(R.id.layout_notes); + + return aSlideNotesLayout != null; + } + private boolean areSlideNotesAvailable(int aSlideIndex) { String aSlideNotes = mCommunicationService.getSlideShow().getSlideNotes(aSlideIndex); |