Class MeasurementScaleView

  • All Implemented Interfaces:
    android.graphics.drawable.Drawable.Callback , android.view.KeyEvent.Callback , android.view.ViewManager , android.view.ViewParent , android.view.accessibility.AccessibilityEventSource

    
    public class MeasurementScaleView
    extends FrameLayout
                        

    This view is used as a FAB of a sort to set/show the measurement scale

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void bindController(@NonNull() AnnotationCreationController controller) Binds to the annotation creation controller and animates the measurement scale view into view
      void unbindController() Unbinds from annotation creation controller.
      void setMeasurementScaleViewVisibility(boolean visible, boolean animate) Shows the button used to show the set scale or open the scale inspector
      void updateScaleLabel(String text, boolean isScaleSet) Sets the text in the scale text view and toggles the visibility of the scale not set icon
      • Methods inherited from class java.lang.Object

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

      • MeasurementScaleView

        MeasurementScaleView(Context context)
      • MeasurementScaleView

        MeasurementScaleView(Context context, AttributeSet attrs, int defStyleAttr)
    • Method Detail

      • bindController

         void bindController(@NonNull() AnnotationCreationController controller)

        Binds to the annotation creation controller and animates the measurement scale view into view

        Parameters:
        controller - is the annotation creation controller
      • unbindController

         void unbindController()

        Unbinds from annotation creation controller. Animates measurement scale view out of view.

      • setMeasurementScaleViewVisibility

         void setMeasurementScaleViewVisibility(boolean visible, boolean animate)

        Shows the button used to show the set scale or open the scale inspector

        Parameters:
        visible - true to make the button visible, false to hide it again.
      • updateScaleLabel

         void updateScaleLabel(String text, boolean isScaleSet)

        Sets the text in the scale text view and toggles the visibility of the scale not set icon

        Parameters:
        text - is the text to be written
        isScaleSet - flag to check whether there is a scale, which influences the text color