Esempio n. 1
0
        private float GetTranslationY(CoordinatorLayout parent, View child)
        {
            float minOffset    = 0.0F;
            var   dependencies = parent.GetDependencies(child);
            int   i            = 0;

            for (int z = dependencies.Count; i < z; ++i)
            {
                View view = (View)dependencies[i];
                if (IsInstanceOf <Snackbar.SnackbarLayout>(view) && parent.DoViewsOverlap(child, view))
                {
                    minOffset = Math.Min(minOffset, ViewCompat.GetTranslationY(view) - (float)view.Height);
                }
            }

            return(minOffset);
        }
        private static float GetTranslationY(CoordinatorLayout parent, Android.Views.View child)
        {
            var minOffset    = 0.0F;
            var dependencies = parent.GetDependencies(child);
            var i            = 0;

            for (var z = dependencies.Count; i < z; ++i)
            {
                var view = dependencies[i];
                if (IsInstanceOf <Snackbar.SnackbarLayout>(view) && parent.DoViewsOverlap(child, view))
                {
                    minOffset = Math.Min(minOffset, ViewCompat.GetTranslationY(view) - view.Height);
                }
            }

            return(minOffset);
        }