public void OnOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) { try { int minHeight = ViewCompat.GetMinimumHeight(CollapsingToolbar) * 2; float scale = (float)(minHeight + verticalOffset) / minHeight; BtnAdd.ScaleX = scale >= 0 ? scale : 0; BtnAdd.ScaleY = scale >= 0 ? scale : 0; } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
public void OnOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) { try { int minHeight = ViewCompat.GetMinimumHeight(CollapsingToolbar) * 2; float scale = (float)(minHeight + verticalOffset) / minHeight; BtnEdit.ScaleX = scale >= 0 ? scale : 0; BtnEdit.ScaleY = scale >= 0 ? scale : 0; } catch (Exception e) { Console.WriteLine(e); } }