зеркало из https://github.com/DeGsoft/maui-linux.git
Use style resources when calling SetTextAppearance (#108)
* Use style resources in SetTextAppearance calls * Set to styles which match previous defaults
This commit is contained in:
Родитель
e2d3adcdaf
Коммит
89a50d4bc1
|
@ -56,7 +56,7 @@ namespace Xamarin.Forms.Platform.Android
|
|||
_mainText.SetSingleLine(true);
|
||||
_mainText.Ellipsize = TextUtils.TruncateAt.End;
|
||||
_mainText.SetPadding((int)context.ToPixels(15), padding, padding, padding);
|
||||
_mainText.SetTextAppearanceCompat(context, global::Android.Resource.Attribute.TextAppearanceListItem);
|
||||
_mainText.SetTextAppearanceCompat(context, global::Android.Resource.Style.TextAppearanceSmall);
|
||||
|
||||
using (var lp = new LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent))
|
||||
textLayout.AddView(_mainText, lp);
|
||||
|
@ -66,7 +66,7 @@ namespace Xamarin.Forms.Platform.Android
|
|||
_detailText.Ellipsize = TextUtils.TruncateAt.End;
|
||||
_detailText.SetPadding((int)context.ToPixels(15), padding, padding, padding);
|
||||
_detailText.Visibility = ViewStates.Gone;
|
||||
_detailText.SetTextAppearanceCompat(context, global::Android.Resource.Attribute.TextAppearanceListItemSmall);
|
||||
_detailText.SetTextAppearanceCompat(context, global::Android.Resource.Style.TextAppearanceSmall);
|
||||
|
||||
using (var lp = new LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.WrapContent))
|
||||
textLayout.AddView(_detailText, lp);
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Xamarin.Forms.Platform.Android
|
|||
SetPadding((int)context.ToPixels(15), padding, padding, padding);
|
||||
|
||||
_label = new TextView(context);
|
||||
_label.SetTextAppearanceCompat(context, global::Android.Resource.Attribute.TextAppearanceListItem);
|
||||
_label.SetTextAppearanceCompat(context, global::Android.Resource.Style.TextAppearanceSmall);
|
||||
|
||||
var layoutParams = new LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent) { Gravity = GravityFlags.CenterVertical };
|
||||
using (layoutParams)
|
||||
|
|
Загрузка…
Ссылка в новой задаче