AddTotalTimeLabel();
sliderView = new View();
sliderView.BackgroundColor = Color.Transparent;
- sliderView.WidthResizePolicy = ResizePolicyType.FillToParent;
if (DeviceInfo.IsPortrait)
{
sliderView.Layout = new LinearLayout()
VerticalAlignment = VerticalAlignment.Center,
Padding = new Extents(33, 33, 0, 8).SpToPx(),
};
- sliderView.SizeHeight = 61.SpToPx();
+ sliderView.WidthSpecification = LayoutParamPolicies.MatchParent;
+ sliderView.HeightSpecification = 61.SpToPx();
Add(sliderView);
currentTime.WidthSpecification = 72.SpToPx();
sliderView.Add(currentTime);
}
else
{
- sliderView.SizeHeight = 24.SpToPx();
- baseView.Add(playbackSlider);
+ sliderView.HeightSpecification = LayoutParamPolicies.MatchParent;
+ sliderView.WidthSpecification = (int)((Window.Instance.Size.Width - 128.SpToPx()) * 0.35);
+ baseView.Add(sliderView);
sliderView.Layout = new RelativeLayout();
- sliderView.Position2D = new Position2D(0, SliderHeight).SpToPx();
- playbackSlider.Add(sliderView);
+ sliderView.Add(playbackSlider);
+ RelativeLayout.SetTopRelativeOffset(playbackSlider, 0.0f);
+ RelativeLayout.SetLeftRelativeOffset(playbackSlider, 0.0f);
+ RelativeLayout.SetRightRelativeOffset(playbackSlider, 1.0f);
+ RelativeLayout.SetVerticalAlignment(playbackSlider, RelativeLayout.Alignment.Center);
+
sliderView.Add(currentTime);
+ RelativeLayout.SetTopTarget(currentTime, playbackSlider);
+ RelativeLayout.SetTopRelativeOffset(currentTime, 1.0f);
RelativeLayout.SetHorizontalAlignment(currentTime, RelativeLayout.Alignment.Start);
sliderView.Add(totalTime);
RelativeLayout.SetHorizontalAlignment(totalTime, RelativeLayout.Alignment.End);
+ RelativeLayout.SetTopTarget(totalTime, playbackSlider);
+ RelativeLayout.SetTopRelativeOffset(totalTime, 1.0f);
}
}
ThemeChangeSensitive = true,
MinValue = 0.0f,
MaxValue = 1.0f,
- WidthSpecification = (int)((Window.Instance.Size.Width - 128.SpToPx()) * 0.35),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
HeightSpecification = SliderHeight.SpToPx(),
ThumbSize = new Size(30, 30).SpToPx(),
Direction = Slider.DirectionType.Horizontal,