Class CustomColorPickerInspectorDetailView
-
- 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
,com.pspdfkit.ui.inspector.views.ColorPickerInspectorView.ColorPickerDetailView
public class CustomColorPickerInspectorDetailView extends LinearLayout implements ColorPickerInspectorView.ColorPickerDetailView
Detail view for the ColorPickerInspectorView that provides options for the user to set custom colors. Used in PropertyInspector.
-
-
Constructor Summary
Constructors Constructor Description CustomColorPickerInspectorDetailView(Context context, Array<int> colors, int defaultValue)
CustomColorPickerInspectorDetailView(Context context, List<Integer> colors, int defaultValue)
-
Method Summary
Modifier and Type Method Description void
setOnColorPickedListener(@Nullable() ColorPickerInspectorView.ColorPickerListener listener)
Sets listener for picked colors. Parcelable
getState()
Called when it's time to save the view state. void
setState(@NonNull() Parcelable state)
Called to restore the state that was saved before by calling getState. 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. void
onHidden()
Called when this inspector view was hidden. int
getMinimumHeight()
int
getMaximumHeight()
Called to get the maximum height the detail view will be. 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. -
-
Method Detail
-
setOnColorPickedListener
void setOnColorPickedListener(@Nullable() ColorPickerInspectorView.ColorPickerListener listener)
Sets listener for picked colors. Calling this method will replace any previously set listener. You may provide
null
to clear the listener.- Parameters:
listener
- that should be notified, ornull
to clear the listener.
-
getState
@Nullable() Parcelable getState()
Called when it's time to save the view state. It will later be restored by calling setState ()}
- Returns:
The state you want to save.
-
setState
void setState(@NonNull() Parcelable state)
Called to restore the state that was saved before by calling getState.
- Parameters:
state
- The state to restore.
-
bindController
void bindController(@NonNull() PropertyInspectorController controller)
Bind to property inspector controller.
-
unbindController
void unbindController()
Unbind from property inspector controller.
-
onHidden
void onHidden()
Called when this inspector view was hidden.
-
getMinimumHeight
int getMinimumHeight()
-
getMaximumHeight
int getMaximumHeight()
Called to get the maximum height the detail view will be.
- Returns:
The maximum size this detail view will be.
-
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.
-
-
-
-