Package com.pspdfkit.ui.inspector.views
Class SliderPickerInspectorView
-
- 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 SliderPickerInspectorView extends FrameLayout implements PropertyInspectorView
Picker with slider for picking numbers from integer range.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
SliderPickerInspectorView.SliderPickerListener
Listener for picked values.
-
Constructor Summary
Constructors Constructor Description SliderPickerInspectorView(Context context, String label, String unitLabel, int minValue, int maxValue, int defaultValue, SliderPickerInspectorView.SliderPickerListener listener)
Construct slider picker.
-
Method Summary
Modifier and Type Method Description 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. void
setValue(int value)
Sets value to the slider view and edit text view. -
-
Constructor Detail
-
SliderPickerInspectorView
SliderPickerInspectorView(Context context, String label, String unitLabel, int minValue, int maxValue, int defaultValue, SliderPickerInspectorView.SliderPickerListener listener)
Construct slider picker.- Parameters:
context
- The context to use.label
- Label displayed before slider view.unitLabel
- Unit label format.minValue
- Minimum slider value.maxValue
- Maximum slider value.defaultValue
- Initial value set for the slider and the edit text.listener
- Listener called when new values are picked using the slider.
-
-
Method Detail
-
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.
-
setValue
void setValue(int value)
Sets value to the slider view and edit text view.
-
-
-
-