diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Cells/EntryCellRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Cells/EntryCellRenderer.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Cells/EntryCellRenderer.cs b/Xamarin.Forms.Platform.Tizen/Cells/EntryCellRenderer.cs index b74a6f96..5db92394 100644 --- a/Xamarin.Forms.Platform.Tizen/Cells/EntryCellRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Cells/EntryCellRenderer.cs @@ -8,7 +8,7 @@ namespace Xamarin.Forms.Platform.Tizen { public class EntryCellRenderer : ViewCellRenderer { - static readonly int s_defaultHeight = 120; + static readonly double s_defaultHeight = 65; static readonly EColor s_defaultLabelColor = EColor.Black; readonly Dictionary<EvasObject, VisualElement> _cacheCandidate = new Dictionary<EvasObject, VisualElement>(); @@ -22,8 +22,8 @@ namespace Xamarin.Forms.Platform.Tizen if (part == MainContentPart) { var entryCell = cell as EntryCell; - int height = (int)entryCell.RenderHeight; - height = height > 0 ? height : s_defaultHeight; + int pixelHeight = Forms.ConvertToScaledPixel(entryCell.RenderHeight); + pixelHeight = pixelHeight > 0 ? pixelHeight : Forms.ConvertToPixel(s_defaultHeight); var label = new Label() { @@ -56,10 +56,10 @@ namespace Xamarin.Forms.Platform.Tizen }; layout.Parent = cell.Parent; layout.BindingContext = entryCell; - layout.MinimumHeightRequest = height; + layout.MinimumHeightRequest = Forms.ConvertToScaledDP(pixelHeight); var nativeView = Platform.GetOrCreateRenderer(layout).NativeView; - nativeView.MinimumHeight = height; + nativeView.MinimumHeight = pixelHeight; _cacheCandidate[nativeView] = layout; nativeView.Deleted += (sender, e) => { @@ -79,8 +79,8 @@ namespace Xamarin.Forms.Platform.Tizen var layout = _cacheCandidate[old]; layout.BindingContext = cell; - int height = (int)cell.RenderHeight; - height = height > 0 ? height : s_defaultHeight; + int height = Forms.ConvertToScaledPixel(cell.RenderHeight); + height = height > 0 ? height : Forms.ConvertToPixel(s_defaultHeight); old.MinimumHeight = height; return old; } |