Merge pull request #8261 from osmandapp/MultilineDescription
Support multiline description
This commit is contained in:
commit
ca8c71c623
8 changed files with 18 additions and 5 deletions
|
@ -3,10 +3,12 @@
|
|||
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"
|
||||
android:paddingBottom="@dimen/content_padding_half"
|
||||
android:paddingTop="@dimen/content_padding_half"
|
||||
android:paddingLeft="@dimen/content_padding"
|
||||
android:paddingRight="@dimen/content_padding">
|
||||
|
||||
|
@ -26,7 +28,6 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.ListItemTitle"
|
||||
tools:text="Title"/>
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
android:background="?attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/bottom_sheet_selected_item_title_height"
|
||||
android:paddingBottom="@dimen/content_padding_half"
|
||||
android:paddingTop="@dimen/content_padding_half"
|
||||
android:paddingLeft="@dimen/content_padding"
|
||||
android:paddingRight="@dimen/content_padding">
|
||||
|
||||
|
@ -26,7 +28,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"/>
|
||||
|
|
|
@ -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"
|
||||
|
@ -25,11 +25,12 @@
|
|||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/content_padding_half"
|
||||
android:paddingTop="@dimen/content_padding_half"
|
||||
android:layout_marginEnd="@dimen/content_padding"
|
||||
android:layout_marginRight="@dimen/content_padding"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.ListItemTitle"
|
||||
tools:text="OsmAnd"/>
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="@dimen/content_padding_half"
|
||||
android:paddingBottom="@dimen/content_padding_half"
|
||||
android:background="?attr/card_and_list_background_basic"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
@ -45,6 +47,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"
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue