com.samsung.android.sdk.look.writingbuddy
Class SlookWritingBuddy
- java.lang.Object
-
- com.samsung.android.sdk.look.writingbuddy.SlookWritingBuddy
-
public final class SlookWritingBuddy extends java.lang.Object
WritingBuddy returns recognized text or bitmap after hand-writing in served view.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
SlookWritingBuddy.ImageWritingListener
Interface definition for a callback to be invoked when image-writing is finished.static interface
SlookWritingBuddy.TextWritingListener
Interface definition for a callback to be invoked when text-writing is finished.
-
Field Summary
Fields Modifier and Type Field and Description static int
TYPE_EDITOR_NUMBER
Number recognition modestatic int
TYPE_EDITOR_TEXT
Text recognition mode
-
Constructor Summary
Constructors Constructor and Description SlookWritingBuddy(android.widget.EditText editText)
Simple constructor to use writing buddy feature for Edittext.SlookWritingBuddy(android.view.ViewGroup parentView)
Simple constructor to use writing buddy feature for Viewgroup.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
getEditorType()
Gets an editor type that used in input panel.boolean
isEnabled()
Check whether Writingbuddy is enabled.void
setEditorType(int type)
Sets an editor type that used in input panel.void
setEnabled(boolean enabled)
Set the WritingBuddy. this just turns on/off function without destroying WritingBuddy object. so you can enable again while maintaining previous settingvoid
setImageWritingListener(SlookWritingBuddy.ImageWritingListener l)
Sets an listener to be called when commit text from input panel.void
setTextWritingListener(SlookWritingBuddy.TextWritingListener l)
Sets an listener to be called when commit text from input panel.
-
-
-
Field Detail
-
TYPE_EDITOR_NUMBER
public static final int TYPE_EDITOR_NUMBER
Number recognition mode- See Also:
- Constant Field Values
-
TYPE_EDITOR_TEXT
public static final int TYPE_EDITOR_TEXT
Text recognition mode- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SlookWritingBuddy
public SlookWritingBuddy(android.view.ViewGroup parentView)
Simple constructor to use writing buddy feature for Viewgroup.- Parameters:
parentView
- The served view for writing buddy.- Since:
- 1.0.0
-
SlookWritingBuddy
public SlookWritingBuddy(android.widget.EditText editText)
Simple constructor to use writing buddy feature for Edittext.- Parameters:
editText
- The served view for getting hand-writing image.- Since:
- 1.0.0
-
-
Method Detail
-
setEditorType
public void setEditorType(int type)
Sets an editor type that used in input panel. WritingBuddy's input panel will be set as this type such as numeric, text. This can be used when you want to use WB in normal Widget not EditText.- Parameters:
type
- type TYPE_EDITOR_NUMBER,TYPE_EDITOR_TEXT- Since:
- 1.0.0
-
getEditorType
public int getEditorType()
Gets an editor type that used in input panel.- Since:
- 1.0.0
-
setTextWritingListener
public void setTextWritingListener(SlookWritingBuddy.TextWritingListener l)
Sets an listener to be called when commit text from input panel. This can be used when you want to use WB in normal Widget not EditText.- Parameters:
l
- TextWritingListener- Since:
- 1.0.0
-
setImageWritingListener
public void setImageWritingListener(SlookWritingBuddy.ImageWritingListener l)
Sets an listener to be called when commit text from input panel. This can be used when you want to get hand-writing image.- Parameters:
l
- ImageWritingListener- Since:
- 1.0.0
-
setEnabled
public void setEnabled(boolean enabled)
Set the WritingBuddy. this just turns on/off function without destroying WritingBuddy object. so you can enable again while maintaining previous setting- Parameters:
enabled
- if true, writingbuddy is set.- Since:
- 1.0.0
-
isEnabled
public boolean isEnabled()
Check whether Writingbuddy is enabled.- Returns:
- true if the writing buddy is enabled
- Since:
- 1.0.0
-
-