diff options
author | Seungkeun Lee <sngn.lee@samsung.com> | 2017-02-08 10:17:28 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-03-24 13:19:02 +0900 |
commit | 3615230ea8508c74ee0923116688ce85154adb9f (patch) | |
tree | d9c6d82432029b1b07abf6208e4929fb5a0b353f /Xamarin.Forms.Platform.Tizen/Cells/CellRenderer.cs | |
parent | 5f2706e4c098da7cb2af87540d30334beae78a83 (diff) | |
download | xamarin-forms-3615230ea8508c74ee0923116688ce85154adb9f.tar.gz xamarin-forms-3615230ea8508c74ee0923116688ce85154adb9f.tar.bz2 xamarin-forms-3615230ea8508c74ee0923116688ce85154adb9f.zip |
Support density independent pixel
- Support Enable/Disable of this feature
- By default, it was disabled. if you want enabling DP support feature,
Use Forms.Init(FormsApplication application, bool useDeviceIndependentPixel) API
- Hard-coded pixel value was changed to DP units
- If you deal with native coordinate, use Forms.ConvertToScaledPixel / Forms.ConvertToScaledDP
- If you convert hard-coded DP to pixels, use Forms.ConvertToPixel
- Update font size convert formula
Change-Id: I345115551e1c37d27b8a7152af5ef847d035c9a4
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Cells/CellRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Cells/CellRenderer.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Cells/CellRenderer.cs b/Xamarin.Forms.Platform.Tizen/Cells/CellRenderer.cs index 096c1689..e66db635 100644 --- a/Xamarin.Forms.Platform.Tizen/Cells/CellRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Cells/CellRenderer.cs @@ -1,6 +1,5 @@ using ElmSharp; using System.Collections.Generic; -using EColor = ElmSharp.Color; namespace Xamarin.Forms.Platform.Tizen { @@ -58,14 +57,14 @@ namespace Xamarin.Forms.Platform.Tizen return null; } - protected int FindCellContentHeight(Cell cell) + protected double FindCellContentHeight(Cell cell) { ViewCell viewCell = cell as ViewCell; if (viewCell != null) { var parentWidth = (cell.Parent as VisualElement).Width; var view = viewCell.View; - return (int)view.Measure(parentWidth, double.PositiveInfinity).Request.Height; + return view.Measure(parentWidth, double.PositiveInfinity).Request.Height; } else return -1; |