Class FontPickerInspectorView
-
- 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 FontPickerInspectorView extends FrameLayout implements PropertyInspectorView
Inspector component for picking fonts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
FontPickerInspectorView.FontPickerListener
Listener for font changes.
public interface
FontPickerInspectorView.FontSizePickerListener
Listener for font size changes for the Content Editing Bar.
-
Constructor Summary
Constructors Constructor Description FontPickerInspectorView(Context context, List<Font> fonts, Font defaultValue, FontPickerInspectorView.FontPickerListener listener)
Construct font 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. boolean
isViewStateRestorationEnabled()
Flag to determine whether to save the state by calling on the view the saveHierarchyState to save its state and restoreHierarchyState to restore it. -
-
Constructor Detail
-
FontPickerInspectorView
FontPickerInspectorView(Context context, List<Font> fonts, Font defaultValue, FontPickerInspectorView.FontPickerListener listener)
Construct font picker.- Parameters:
context
- The context to use.fonts
- Available fonts colors.defaultValue
- Default displayed font.
-
-
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.
-
isViewStateRestorationEnabled
boolean isViewStateRestorationEnabled()
Flag to determine whether to save the state by calling on the view the saveHierarchyState to save its state and restoreHierarchyState to restore it. Defaults to
false
. When enabled, the view must implementView#onSaveInstanceState
andView#onRestoreInstanceState
, and a unique id must be set by setId.
-
-
-
-