diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
index ac922c2349..4c6ee40d0e 100644
--- a/res/xml/preferences.xml
+++ b/res/xml/preferences.xml
@@ -25,7 +25,7 @@
android:title="@string/prefs_select_oc_account"
android:summary="@string/prefs_summary_select_oc_account"
/ -->
-
+
.
+ *
+ */
+
+package com.owncloud.android.ui;
+
+import android.content.Context;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.TextView;
+
+/**
+ * Allow multiline titles in preferences
+ *
+ * @author masensio
+ *
+ */
+public class PreferenceMultiline extends Preference {
+
+ public PreferenceMultiline(Context context) {
+ super(context);
+ }
+
+ public PreferenceMultiline(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public PreferenceMultiline(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ @Override
+ protected void onBindView(View view) {
+ super.onBindView(view);
+ TextView titleView = (TextView) view.findViewById(android.R.id.title);
+ titleView.setSingleLine(false);
+ titleView.setMaxLines(3);
+ }
+}