1 /* ownCloud Android client application
2 * Copyright (C) 2011 Bartek Przybylski
3 * Copyright (C) 2012-2013 ownCloud Inc.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2,
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 package com
.owncloud
.android
.ui
;
19 import android
.content
.Context
;
20 import android
.util
.AttributeSet
;
21 import android
.view
.View
;
22 import android
.widget
.TextView
;
23 import android
.preference
.CheckBoxPreference
;
25 public class CheckBoxPreferenceWithLongTitle
extends CheckBoxPreference
{
27 public CheckBoxPreferenceWithLongTitle(Context context
) {
31 public CheckBoxPreferenceWithLongTitle(Context context
, AttributeSet attrs
) {
32 super(context
, attrs
);
34 public CheckBoxPreferenceWithLongTitle(Context context
, AttributeSet attrs
, int defStyle
) {
35 super(context
, attrs
, defStyle
);
39 protected void onBindView(View view
) {
40 super.onBindView(view
);
41 TextView titleView
= (TextView
) view
.findViewById(android
.R
.id
.title
);
42 titleView
.setSingleLine(false
);
43 titleView
.setMaxLines(3);