summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorArtur Dryomov <artur.dryomov@gmail.com>2013-09-14 19:18:24 +0300
committerArtur Dryomov <artur.dryomov@gmail.com>2013-09-14 19:38:45 +0300
commit7dcbd06d018dd079878dec6318427aca36db0a0f (patch)
tree552171e53b21dbf208c0dcc74b47fe3856b3f7d8 /android
parent4c7ad3859a27ae5376a24dcfca291670b86e3367 (diff)
Add custom capitalized TextView.
To provide visual compatibility for 2.3 devices. Change-Id: Ibdcc80a2f3d5a43dd8998153f2d872e564ec1c11
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/res/layout/action_bar_computer_creation.xml4
-rw-r--r--android/sdremote/res/layout/activity_requirements.xml6
-rw-r--r--android/sdremote/res/layout/fragment_slides_pager.xml2
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/view/CapsTextView.java34
4 files changed, 40 insertions, 6 deletions
diff --git a/android/sdremote/res/layout/action_bar_computer_creation.xml b/android/sdremote/res/layout/action_bar_computer_creation.xml
index 5e6ea3696fb6..59e14954b5f7 100644
--- a/android/sdremote/res/layout/action_bar_computer_creation.xml
+++ b/android/sdremote/res/layout/action_bar_computer_creation.xml
@@ -11,7 +11,7 @@
android:layout_width="0dp"
android:layout_height="match_parent">
- <TextView
+ <org.libreoffice.impressremote.view.CapsTextView
style="@style/Widget.Sherlock.ActionBar.TabText"
android:text="@string/button_cancel"
android:drawableLeft="@drawable/ic_action_cancel"
@@ -38,7 +38,7 @@
android:layout_width="0dp"
android:layout_height="match_parent">
- <TextView
+ <org.libreoffice.impressremote.view.CapsTextView
style="@style/Widget.Sherlock.ActionBar.TabText"
android:text="@string/button_save"
android:drawableLeft="@drawable/ic_action_save"
diff --git a/android/sdremote/res/layout/activity_requirements.xml b/android/sdremote/res/layout/activity_requirements.xml
index 138ea563321b..dc48b7c25bd7 100644
--- a/android/sdremote/res/layout/activity_requirements.xml
+++ b/android/sdremote/res/layout/activity_requirements.xml
@@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <TextView
+ <org.libreoffice.impressremote.view.CapsTextView
style="@style/SectionHeader"
android:text="@string/title_generic"/>
@@ -21,7 +21,7 @@
style="@style/SectionItem"
android:text="@string/requirements_libreoffice_general_enabled"/>
- <TextView
+ <org.libreoffice.impressremote.view.CapsTextView
style="@style/SectionHeader"
android:text="@string/title_wifi"/>
@@ -37,7 +37,7 @@
style="@style/SectionItem"
android:text="@string/requirements_network_ports"/>
- <TextView
+ <org.libreoffice.impressremote.view.CapsTextView
style="@style/SectionHeader"
android:text="@string/title_bluetooth"/>
diff --git a/android/sdremote/res/layout/fragment_slides_pager.xml b/android/sdremote/res/layout/fragment_slides_pager.xml
index 04a6294e8a0b..8bf235cbf59e 100644
--- a/android/sdremote/res/layout/fragment_slides_pager.xml
+++ b/android/sdremote/res/layout/fragment_slides_pager.xml
@@ -22,7 +22,7 @@
android:layout_width="match_parent"
android:layout_height="0dp">
- <TextView
+ <org.libreoffice.impressremote.view.CapsTextView
style="@style/SectionHeader"
android:text="@string/header_notes"
android:paddingTop="@dimen/padding_header"/>
diff --git a/android/sdremote/src/org/libreoffice/impressremote/view/CapsTextView.java b/android/sdremote/src/org/libreoffice/impressremote/view/CapsTextView.java
new file mode 100644
index 000000000000..84b632fe80c6
--- /dev/null
+++ b/android/sdremote/src/org/libreoffice/impressremote/view/CapsTextView.java
@@ -0,0 +1,34 @@
+/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ */
+package org.libreoffice.impressremote.view;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+public class CapsTextView extends TextView {
+ public CapsTextView(Context aContext) {
+ super(aContext);
+ }
+
+ public CapsTextView(Context aContext, AttributeSet aAttributeSet) {
+ super(aContext, aAttributeSet);
+ }
+
+ public CapsTextView(Context aContext, AttributeSet aAttributeSet, int aDefinedStyle) {
+ super(aContext, aAttributeSet, aDefinedStyle);
+ }
+
+ @Override
+ public void setText(CharSequence aText, BufferType aBufferType) {
+ super.setText(aText.toString().toUpperCase(), aBufferType);
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */