diff options
Diffstat (limited to 'android/sdremote')
3 files changed, 27 insertions, 0 deletions
diff --git a/android/sdremote/res/layout-land/fragment_empty_slide.xml b/android/sdremote/res/layout-land/fragment_empty_slide.xml new file mode 100644 index 000000000000..37a733d2f47f --- /dev/null +++ b/android/sdremote/res/layout-land/fragment_empty_slide.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<ImageView xmlns:android="http://schemas.android.com/apk/res/android" + android:src="@color/background_slide_empty" + android:contentDescription="@string/description_empty_slide" + android:layout_gravity="center" + android:padding="@dimen/padding_empty_slide_layout" + android:layout_width="match_parent" + android:layout_height="match_parent"/>
\ No newline at end of file diff --git a/android/sdremote/res/layout-land/fragment_slides_pager.xml b/android/sdremote/res/layout-land/fragment_slides_pager.xml new file mode 100644 index 000000000000..c539b85271de --- /dev/null +++ b/android/sdremote/res/layout-land/fragment_slides_pager.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.v4.view.ViewPager + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/pager_slides" + android:layout_gravity="center" + android:paddingTop="@dimen/padding_slides_pager" + android:paddingBottom="@dimen/padding_slides_pager" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/>
\ No newline at end of file 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); |