Multiline Description

This commit is contained in:
Nazar 2020-01-20 11:26:45 +02:00
parent 14d5a96e46
commit 4933ed9256
8 changed files with 10 additions and 5 deletions

View file

@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_list_item_height"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:minHeight="@dimen/bottom_sheet_list_item_height"
@ -26,7 +26,6 @@
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.ListItemTitle"
tools:text="Title"/>

View file

@ -26,7 +26,6 @@
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.ListItemTitle"
osmand:typeface="@string/font_roboto_regular"
tools:text="Title"/>

View file

@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_list_item_height"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:minHeight="@dimen/bottom_sheet_list_item_height"
@ -29,7 +29,6 @@
android:layout_marginRight="@dimen/content_padding"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.ListItemTitle"
tools:text="OsmAnd"/>

View file

@ -35,6 +35,7 @@
android:layout_height="wrap_content"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:maxLines="2"
android:textColor="?attr/app_bar_primary_item_color"
android:textSize="@dimen/dialog_header_text_size"
app:typeface="@string/font_roboto_medium"

View file

@ -33,6 +33,7 @@
android:letterSpacing="@dimen/text_button_letter_spacing"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:maxLines="2"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/dialog_header_text_size"
osmand:typeface="@string/font_roboto_medium"

View file

@ -38,6 +38,7 @@
android:letterSpacing="@dimen/text_button_letter_spacing"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:maxLines="2"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/dialog_header_text_size"
osmand:typeface="@string/font_roboto_medium"

View file

@ -45,6 +45,7 @@
android:letterSpacing="@dimen/text_button_letter_spacing"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:maxLines="2"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/dialog_header_text_size"
osmand:typeface="@string/font_roboto_medium"

View file

@ -367,6 +367,10 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
AndroidUtils.setBackground(selectableView, drawable);
}
}
TextView tvPreferenceTitle = (TextView) holder.itemView.findViewById(android.R.id.title);
if (tvPreferenceTitle != null) {
tvPreferenceTitle.setSingleLine(false);
}
if (currentScreenType.profileDependent) {
View cb = holder.itemView.findViewById(R.id.switchWidget);
if (cb == null) {