Class Unit

  • All Implemented Interfaces:
    kotlin.Cloneable

    
    public abstract class Unit
     implements Cloneable
                        

    class to represent a unit of measurement.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum Unit.Type
      public final class Unit.Pixel

      pixel unit. It is just a wrapper for a float to be honest, it's that simple.

      public final class Unit.Center
      public final class Unit.Sibling
      public final class Unit.Percent

      a dynamic unit, that is a percentage of its parents size.

      public final class Unit.VUnits

      viewport-specific units.

      public final class Unit.Flex

      represents the index of a flex component

      public final class Unit.Grid

      Represents a grid component.

      public interface Unit.Concrete

      specify a unit as an always present value that does not change.

      public interface Unit.Dynamic

      specify a unit as something that is dependent on another value.

      public interface Unit.Dynamic2
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Float px
      private final transient Unit.Type type
    • Constructor Summary

      Constructors 
      Constructor Description
      Unit(Unit.Type type)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description