public void OnScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { parallaxImage.SetY(parallaxImage.Top - scrollY / 3); var imageParams = parallaxImage.LayoutParameters; imageParams.Width = DimensHelper.GetScreenWidth() + scrollY / 4; parallaxImage.LayoutParameters = imageParams; }
public void ChangeBackgroundCollectionHeight(bool isShowed) { var aspectSpace = Math.Round(topLayoutConstantAspect * DimensHelper.GetScreenWidth()); var margins = (DimensHelper.GetDimensById(Resource.Dimension.points_margin)); var topHeight = aspectSpace + margins; PointsHeightHelper.UpdateBackgroundCollectionViewHeight(collectionBackgroundView, isShowed, topHeight); }
public void ChangeBackgroundCollectionHeight(bool isShowed) { var aspectSpace = Math.Round(topLayoutConstantAspect * DimensHelper.GetScreenWidth()); var margins = (DimensHelper.GetDimensById(Resource.Dimension.points_margin)); var topHeight = aspectSpace + margins; if (collectionBackgroundView == null) { view = this.BindingInflate(FragmentId, null, true); collectionBackgroundView = view.FindViewById <View>(Resource.Id.collection_background_view); } PointsHeightHelper.UpdateBackgroundCollectionViewHeight(collectionBackgroundView, isShowed, topHeight); }
private int GetHeightForList() { var aspectSpace = Math.Round(topLayoutConstantAspect * DimensHelper.GetScreenWidth()); var margins = (DimensHelper.GetDimensById(Resource.Dimension.leaderboard_image_margin) + DimensHelper.GetDimensById(Resource.Dimension.points_margin)); tvOverall.Measure(0, 0); tvRanked.Measure(0, 0); var stageHeight = DimensHelper.GetScreenHeight() - (DimensHelper.GetDimensById(Resource.Dimension.toolbar_height) + DimensHelper.GetDimensById(Resource.Dimension.divider_height) * 2 + DimensHelper.GetDimensById(Resource.Dimension.tabbar_height) + DimensHelper.GetDimensById(Resource.Dimension.points_tabs_height)); var textHeight = tvOverall.MeasuredHeight + tvRanked.MeasuredHeight; var topHeight = aspectSpace + margins + textHeight; var listHeight = stageHeight - topHeight; return((int)listHeight); }