Class PrecisionPickerInspectorView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
,com.pspdfkit.ui.inspector.PropertyInspectorView
public class PrecisionPickerInspectorView extends FrameLayout implements PropertyInspectorView
Inspector component for picking number of decimal points for float value rounding.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
PrecisionPickerInspectorView.PrecisionPickerListener
Listener for precision value being picked.
-
Constructor Summary
Constructors Constructor Description PrecisionPickerInspectorView(Context context, String label, MeasurementPrecision precision, Scale.UnitTo unit, AnnotationType annotationType, PrecisionPickerInspectorView.PrecisionPickerListener listener)
Construct precision picker.
-
Method Summary
Modifier and Type Method Description void
onUnitChanged(Scale.UnitTo unit)
Our options change depending on what the selected unit, so we need to be notified on change. void
setPrecision(MeasurementPrecision precision, boolean notifyListeners)
Sets value to the precision picker. View
getView()
Casts the inspector view to the View class and returns it. void
bindController(@NonNull() PropertyInspectorController controller)
Bind to property inspector controller. void
unbindController()
Unbind from property inspector controller. int
getPropertyInspectorMinHeight()
Height of the parent PropertyInspector that this view would like it to have. int
getPropertyInspectorMaxHeight()
Returns maximum height that this view with all its detail views will occupy. int
getSuggestedHeight()
Returns best height of this view when shown in inspector. -
-
Constructor Detail
-
PrecisionPickerInspectorView
PrecisionPickerInspectorView(Context context, String label, MeasurementPrecision precision, Scale.UnitTo unit, AnnotationType annotationType, PrecisionPickerInspectorView.PrecisionPickerListener listener)
Construct precision picker.- Parameters:
context
- The context to use.precision
- Default precision value selected when showing picker.listener
- Listener for precision picker changes.
-
-
Method Detail
-
onUnitChanged
void onUnitChanged(Scale.UnitTo unit)
Our options change depending on what the selected unit, so we need to be notified on change.
-
setPrecision
void setPrecision(MeasurementPrecision precision, boolean notifyListeners)
Sets value to the precision picker.
-
bindController
void bindController(@NonNull() PropertyInspectorController controller)
Bind to property inspector controller.
-
unbindController
void unbindController()
Unbind from property inspector controller.
-
getPropertyInspectorMinHeight
int getPropertyInspectorMinHeight()
Height of the parent PropertyInspector that this view would like it to have.
- Returns:
Hint for the minimum inspector height or 0 if no min height is specified.
-
getPropertyInspectorMaxHeight
int getPropertyInspectorMaxHeight()
Returns maximum height that this view with all its detail views will occupy.
- Returns:
Hint for the maximum inspector height or 0 if no max height is specified.
-
getSuggestedHeight
int getSuggestedHeight()
Returns best height of this view when shown in inspector. This is used to suggest initial height to inspector parent.
- Returns:
Hint for the view height after being shown in inspector.
-
-
-
-