Package com.pspdfkit.ui.scale
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
-
-
Constructor Summary
Constructors Constructor Description MeasurementScaleView(Context context)
MeasurementScaleView(Context context, AttributeSet attrs)
MeasurementScaleView(Context context, AttributeSet attrs, int defStyleAttr)
-
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 -
-
Constructor Detail
-
MeasurementScaleView
MeasurementScaleView(Context context)
-
MeasurementScaleView
MeasurementScaleView(Context context, AttributeSet attrs)
-
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 writtenisScaleSet
- flag to check whether there is a scale, which influences the text color
-
-
-
-