summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorArtur Dryomov <artur.dryomov@gmail.com>2013-09-10 21:08:50 +0300
committerArtur Dryomov <artur.dryomov@gmail.com>2013-09-11 01:43:53 +0300
commite9d61192574ea7de22beed2644868bfba319ff91 (patch)
tree0152d8c103dc129df0d058d0a88d0d3b47e94d84 /android
parent54433a11e711a440f698c94edcd22379222db1ce (diff)
Remove notes from the landscape layout.
Ignoring tablets at moment. Change-Id: Ie2ac0840cea994e942b2f7e1a7d4a2e73ebd12de
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/res/layout-land/fragment_empty_slide.xml8
-rw-r--r--android/sdremote/res/layout-land/fragment_slides_pager.xml9
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java10
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);