From: masensio Date: Tue, 18 Mar 2014 12:36:16 +0000 (+0100) Subject: OC-3376: 'manage account' field is multiline, in preferences X-Git-Tag: oc-android-1.5.5~5^2~8^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/6e86dfb001aee80ddb4c0d8df9d0c92eabdc46de?ds=inline;hp=-c OC-3376: 'manage account' field is multiline, in preferences --- 6e86dfb001aee80ddb4c0d8df9d0c92eabdc46de diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index ac922c23..4c6ee40d 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); + } +}