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:
E.Z. Hart 2016-04-19 00:58:37 -06:00 коммит произвёл Jason Smith
Родитель e2d3adcdaf
Коммит 89a50d4bc1
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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)