diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-01-13 13:49:54 +0000 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2014-01-16 00:24:10 +0000 |
commit | a689b673b723a72a37bcb9f5ef5db5102b85bb41 (patch) | |
tree | 99ab321e3867faf4db1c80c1207392b178034821 /android | |
parent | 60b187c774430b52c8a4b62642547c6b2852d818 (diff) |
Add tablet specific landscape layout.
The resolution of the slide preview is too low for a maximised
preview to be of much use, hence it makes sense to make the notes
larger when in landscape mode on a tablet.
Also increase the notes size for tablets (either perspective) in
order to be legible from a greater distance.
Change-Id: Iae75dead6bb325970f2309f487a5c198d938fcb4
Reviewed-on: https://gerrit.libreoffice.org/7102
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'android')
6 files changed, 98 insertions, 6 deletions
diff --git a/android/sdremote/res/.gitignore b/android/sdremote/res/.gitignore index 95f74386dc45..b1effe5bdbf4 100644 --- a/android/sdremote/res/.gitignore +++ b/android/sdremote/res/.gitignore @@ -1,2 +1,5 @@ +# Ignore values-* folders as to avoid inadvertently adding any translations +# (which end up in values-[langcode] directories). /values-* !/values-v10 +!/values-xlarge diff --git a/android/sdremote/res/layout-land/fragment_slides_pager.xml b/android/sdremote/res/layout-land/fragment_slides_pager.xml index 22f60007d009..340a4623246b 100644 --- a/android/sdremote/res/layout-land/fragment_slides_pager.xml +++ b/android/sdremote/res/layout-land/fragment_slides_pager.xml @@ -40,7 +40,8 @@ <TextView style="@style/SectionHeader" android:text="@string/header_notes" - android:paddingTop="@dimen/padding_header"/> + android:paddingTop="@dimen/padding_header" + android:textSize="@dimen/text_size_notes"/> <ScrollView android:id="@+id/scroll_notes" @@ -60,11 +61,13 @@ <TextView android:layout_width="match_parent" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content" + android:textSize="@dimen/text_size_notes"/> <TextView android:layout_width="match_parent" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content" + android:textSize="@dimen/text_size_notes"/> </TextSwitcher> diff --git a/android/sdremote/res/layout-xlarge-land/fragment_slides_pager.xml b/android/sdremote/res/layout-xlarge-land/fragment_slides_pager.xml new file mode 100644 index 000000000000..ffd97c4232ae --- /dev/null +++ b/android/sdremote/res/layout-xlarge-land/fragment_slides_pager.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" + android:orientation="horizontal" > + + <android.support.v4.view.ViewPager + android:id="@+id/pager_slides" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" /> + + <LinearLayout + android:id="@+id/layout_notes" + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:orientation="vertical" + android:paddingLeft="@dimen/padding_slides_pager" + android:paddingRight="@dimen/padding_slides_pager" > + + <TextView + style="@style/SectionHeader" + android:paddingTop="@dimen/padding_header" + android:text="@string/header_notes" + android:textSize="@dimen/text_size_notes"/> + + <ScrollView + android:id="@+id/scroll_notes" + android:layout_width="wrap_content" + android:layout_height="wrap_content" > + + <TextSwitcher + android:id="@+id/text_switcher_notes" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inAnimation="@android:anim/fade_in" + android:measureAllChildren="false" + android:outAnimation="@android:anim/fade_out" + android:paddingLeft="@dimen/padding_slide_notes" + android:paddingRight="@dimen/padding_slide_notes" + android:paddingTop="@dimen/padding_slide_notes" > + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="@dimen/text_size_notes"/> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="@dimen/text_size_notes"/> + </TextSwitcher> + </ScrollView> + </LinearLayout> + +</LinearLayout>
\ No newline at end of file diff --git a/android/sdremote/res/layout/fragment_slides_pager.xml b/android/sdremote/res/layout/fragment_slides_pager.xml index 3a9ebb618e5f..8ecb8c98abb6 100644 --- a/android/sdremote/res/layout/fragment_slides_pager.xml +++ b/android/sdremote/res/layout/fragment_slides_pager.xml @@ -42,7 +42,8 @@ <TextView style="@style/SectionHeader" android:text="@string/header_notes" - android:paddingTop="@dimen/padding_header"/> + android:paddingTop="@dimen/padding_header" + android:textSize="@dimen/text_size_notes"/> <ScrollView android:id="@+id/scroll_notes" @@ -62,11 +63,13 @@ <TextView android:layout_width="match_parent" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content" + android:textSize="@dimen/text_size_notes"/> <TextView android:layout_width="match_parent" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content" + android:textSize="@dimen/text_size_notes"/> </TextSwitcher> diff --git a/android/sdremote/res/values-xlarge/dimens.xml b/android/sdremote/res/values-xlarge/dimens.xml new file mode 100644 index 000000000000..5771b36001ec --- /dev/null +++ b/android/sdremote/res/values-xlarge/dimens.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <dimen name="text_size_notes">22sp</dimen> + +</resources>
\ No newline at end of file diff --git a/android/sdremote/res/values/dimens.xml b/android/sdremote/res/values/dimens.xml index 82013fb011ef..6862d4fd4568 100644 --- a/android/sdremote/res/values/dimens.xml +++ b/android/sdremote/res/values/dimens.xml @@ -18,6 +18,8 @@ --> <resources> + <dimen name="text_size_notes">14sp</dimen> + <!-- It is a good practice to follow official design metrics. --> <!-- http://developer.android.com/design/style/metrics-grids.html --> |