Example #1
0
        public void FlexLayoutSetFlexShrink()
        {
            tlog.Debug(tag, $"FlexLayoutSetFlexShrink START");

            View view = new View()
            {
                Size            = new Size(400, 400),
                BackgroundColor = Color.White,
                Layout          = new FlexLayout()
                {
                    Direction = FlexLayout.FlexDirection.Column,
                }
            };

            try
            {
                FlexLayout.SetFlexShrink(view, 0.9f);
            }
            catch (Exception e)
            {
                tlog.Error(tag, "Caught Exception" + e.ToString());
                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
                Assert.Fail("Caught Exception" + e.ToString());
            }

            view.Dispose();
            tlog.Debug(tag, $"FlexLayoutSetFlexShrink END (OK)");
        }
Example #2
0
        public void FlexLayoutGetFlexShrink()
        {
            tlog.Debug(tag, $"FlexLayoutGetFlexShrink START");

            View view = new View()
            {
                Size            = new Size(400, 400),
                BackgroundColor = Color.White,
                Layout          = new FlexLayout()
                {
                    Direction = FlexLayout.FlexDirection.Column,
                }
            };

            FlexLayout.SetFlexShrink(view, 0.9f);
            var result = FlexLayout.GetFlexShrink(view);

            Assert.AreEqual(0.9f, result, "should be equal!");

            view.Dispose();
            tlog.Debug(tag, $"FlexLayoutGetFlexShrink END (OK)");
        }