private bool isAtspiEnabled;
private ReadOnlyCollection<string> displayedValues;
private PickerScroller pickerScroller;
- private View upLine;
- private View downLine;
private IList<TextLabel> itemList;
private Vector2 size;
private TextLabelStyle itemTextLabel;
private bool keyEditMode = false;
private View recoverIndicator = null;
private View keyEditModeIndicator = null;
+ private View UpperMask = null; //For Tizen 7.0 UX
+ private View LowerMask = null; //For Tizen 7.0 UX
/// <summary>
pickerScroller = null;
}
- Remove(upLine);
- Utility.Dispose(upLine);
- Remove(downLine);
- Utility.Dispose(downLine);
+ Remove(UpperMask);
+ Utility.Dispose(UpperMask);
+ Remove(LowerMask);
+ Utility.Dispose(LowerMask);
recoverIndicator = null;
if (keyEditModeIndicator)
if (itemList != null)
foreach (TextLabel textLabel in itemList)
textLabel.ApplyStyle(pickerStyle.ItemTextLabel);
- }
- //Apply PickerCenterLine style.
- if (pickerStyle.Divider != null && upLine != null && downLine != null)
- {
- upLine.ApplyStyle(pickerStyle.Divider);
- downLine.ApplyStyle(pickerStyle.Divider);
- downLine.PositionY = (int)pickerStyle.Divider.PositionY + itemHeight;
+ if (UpperMask != null && LowerMask != null)
+ {
+ UpperMask.SizeHeight = itemHeight * middleItemIdx;
+ LowerMask.SizeHeight = itemHeight * middleItemIdx;
+ LowerMask.PositionY = itemHeight * (middleItemIdx + 1);
+ UpperMask.BackgroundColor = pickerStyle.ItemTextLabel.BackgroundColor.All;
+ LowerMask.BackgroundColor = pickerStyle.ItemTextLabel.BackgroundColor.All;
+ }
}
startScrollY = (itemHeight * dummyItemsForLoop) + startScrollOffset;
loopEnabled = false;
Add(pickerScroller);
- AddLine();
+ AddMasks();
Focusable = true;
KeyEvent += OnKeyEvent;
}
}
- //This is UI requirement. It helps where exactly center item is.
- private void AddLine()
+ //This is an UX requirement. It gives highlight on center item area.
+ private void AddMasks()
{
- upLine = new View();
- downLine = new View();
+ UpperMask = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ Opacity = 0.7f,
+ AccessibilityHidden = true,
+ };
+
+ LowerMask = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ Opacity = 0.7f,
+ AccessibilityHidden = true,
+ };
- Add(upLine);
- Add(downLine);
+ Add(UpperMask);
+ Add(LowerMask);
}
private String GetItemText(bool loopEnabled, int idx)
// Picker base style
theme.AddStyleWithoutClone("Tizen.NUI.Components.Picker", new PickerStyle()
{
- Size = new Size(160, 339),
+ SizeHeight = 220.0f,
+ MinimumSize = new Size(80, -1),
ItemTextLabel = new TextLabelStyle()
{
- //FIXME: Should be check PointSize. given size from UX is too large.
- PixelSize = 32,
+ PixelSize = 24,
VerticalAlignment = VerticalAlignment.Center,
HorizontalAlignment = HorizontalAlignment.Center,
- Size = new Size(0,72),
+ Size = new Size(0, 44),
TextColor = new Selector<Color>()
{
- Normal = new Color("#000C2B"),
+ Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
},
- BackgroundColor = Color.White,
- },
- Divider = new ViewStyle()
- {
- SizeHeight = 2.0f,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- Position = new Position(0, 132),
- BackgroundColor = new Color("#0A0E4A"),
+ BackgroundColor = new Color("#FAFAFA"),
},
- StartScrollOffset = new Size(0, 12),
+ StartScrollOffset = new Size(0, 0),
});
// TabBar base style
// TimePicker base style
theme.AddStyleWithoutClone("Tizen.NUI.Components.TimePicker", new TimePickerStyle()
{
- CellPadding = new Size(50, 339),
+ CellPadding = new Size(12, 220),
Pickers = new PickerStyle()
{
- Size = new Size(160, 339),
+ Size = new Size(80, 220),
ItemTextLabel = new TextLabelStyle()
{
- //FIXME: Should be check PointSize. given size from UX is too large.
- PixelSize = 32,
+ PixelSize = 24,
VerticalAlignment = VerticalAlignment.Center,
HorizontalAlignment = HorizontalAlignment.Center,
- Size = new Size(0,72),
- TextColor = new Color("#000C2B"),
- BackgroundColor = Color.White,
+ Size = new Size(0, 44),
+ TextColor = new Selector<Color>()
+ {
+ Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
+ },
+ BackgroundColor = new Color("#FAFAFA"),
ThemeChangeSensitive = false
},
- Divider = new ViewStyle()
- {
- SizeHeight = 2.0f,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- Position = new Position(0, 132),
- BackgroundColor = new Color("#0A0E4A"),
- },
- StartScrollOffset = new Size2D(0, 12),
+ StartScrollOffset = new Size2D(0, 0),
}
});
// DatePicker base style
theme.AddStyleWithoutClone("Tizen.NUI.Components.DatePicker", new DatePickerStyle()
{
- CellPadding = new Size(50, 339),
+ CellPadding = new Size(12, 220),
Pickers = new PickerStyle()
{
- Size = new Size(160, 339),
+ Size = new Size(80, 220),
ItemTextLabel = new TextLabelStyle()
{
- //FIXME: Should be check PointSize. given size from UX is too large.
- PixelSize = 32,
+ PixelSize = 24,
VerticalAlignment = VerticalAlignment.Center,
HorizontalAlignment = HorizontalAlignment.Center,
- Size = new Size(0,72),
- TextColor = new Color("#000C2B"),
- BackgroundColor = Color.White,
+ Size = new Size(0, 44),
+ TextColor = new Selector<Color>()
+ {
+ Normal = new Color(0.035f, 0.055f, 0.123f, 1.0f),
+ },
+ BackgroundColor = new Color("#FAFAFA"),
ThemeChangeSensitive = false
},
- Divider = new ViewStyle()
- {
- SizeHeight = 2.0f,
- WidthResizePolicy = ResizePolicyType.FillToParent,
- Position = new Position(0, 132),
- BackgroundColor = new Color("#0A0E4A"),
- },
- StartScrollOffset = new Size2D(0, 12),
+ StartScrollOffset = new Size2D(0, 0),
}
});