Class DpToMetersViewSizer

    • Constructor Summary

      Constructors 
      Constructor Description
      DpToMetersViewSizer​(int dpPerMeters)
      Constructor for creating a sizer for controlling the size of a ViewRenderable by defining how many dp there are per meter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getDpPerMeters()
      Returns the number of dp (density-independent pixels) there are per meter that is used for controlling the size of a ViewRenderable.
      Vector3 getSize​(android.view.View view)
      Calculates the desired size of the view in the Scene.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DpToMetersViewSizer

        public DpToMetersViewSizer​(int dpPerMeters)
        Constructor for creating a sizer for controlling the size of a ViewRenderable by defining how many dp there are per meter.
        Parameters:
        dpPerMeters - a number greater than zero representing the ratio of dp to meters
    • Method Detail

      • getDpPerMeters

        public int getDpPerMeters()
        Returns the number of dp (density-independent pixels) there are per meter that is used for controlling the size of a ViewRenderable.
      • getSize

        public Vector3 getSize​(android.view.View view)
        Description copied from interface: ViewSizer
        Calculates the desired size of the view in the Scene. Vector3.x represents the width, and Vector3.y represents the height.
        Specified by:
        getSize in interface ViewSizer
        Parameters:
        view - the view to calculate the size of
        Returns:
        a new vector that represents the view's size in the Scene