public class SpenSettingPenLayout extends RelativeLayout
| Modifier and Type | Class and Description |
|---|---|
static interface |
SpenSettingPenLayout.ActionListener
This listener interface provides callback methods for Pen settings events.
|
static interface |
SpenSettingPenLayout.PresetListener
This listener interface provides callback methods for Pen preset events.
|
static interface |
SpenSettingPenLayout.SeekBarChangeListener
This listener interface provides a callback that notifies clients when the progress level has been
changed.
|
static interface |
SpenSettingPenLayout.ViewListener
This listener interface provides callback methods for Pen settings visibility changed events.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
VIEW_MODE_COLOR
Deprecated.
|
static int |
VIEW_MODE_EXTENSION
Deprecated.
|
static int |
VIEW_MODE_EXTENSION_WITHOUT_PRESET
Deprecated.
|
static int |
VIEW_MODE_EXTENSION_WITHOUT_PRESET_NO_RESIZE
Deprecated.
|
static int |
VIEW_MODE_FAVORITE
Settings view for add Favorite Pen.
|
static int |
VIEW_MODE_MINIMUM
Deprecated.
|
static int |
VIEW_MODE_NORMAL
Normal settings view with Pen type, Preview, Thickness, Select Color, and Preset.
|
static int |
VIEW_MODE_PRESET
Deprecated.
|
static int |
VIEW_MODE_SIZE
Deprecated.
|
static int |
VIEW_MODE_TITLE
Deprecated.
|
static int |
VIEW_MODE_TYPE
Deprecated.
|
| Constructor and Description |
|---|
SpenSettingPenLayout(Context context,
String customImagePath,
RelativeLayout relativeLayout)
Creates an @see SpenSettingPenLayout instance with the specified image file path and relative layout.
|
SpenSettingPenLayout(Context context,
String customImagePath,
RelativeLayout relativeLayout,
float ratio)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the Settings UI.
|
SpenSettingPenInfo |
getInfo()
Get the pen settings information.
|
int |
getViewMode()
Get the current view mode.
|
void |
loadPreferences()
Load the settings preferences.
|
boolean |
onTouchEvent(MotionEvent event) |
void |
removePen(int penIndex)
Remove the Pen with the specified index.
|
void |
requestLayout()
Call this when something has changed which has invalidated the layout of this view.
|
void |
savePreferences()
Save the settings preferences.
|
void |
setActionListener(SpenSettingPenLayout.ActionListener listener)
Set the specified SpenSettingPenLayout.ActionListener to receive Pen settings events.
|
void |
setBeautifyOptionEnabled(boolean enable)
Enable or disable beautify option for Pen.
|
void |
setCanvasView(SpenSettingViewInterface canvasView)
Set the specified canvas view.
|
void |
setColorPickerPosition(int x,
int y)
Set the specified position for the popup color picker.
|
void |
setIndicatorPosition(int x)
Set the specified position for the popup indicator.
|
void |
setInfo(SpenSettingPenInfo settingInfo)
Set the specified Pen settings information.
|
void |
setPenInfoList(List<SpenSettingPenInfo> list)
set up the pen setting infomation list
|
void |
setPosition(int x,
int y)
Set the specified position for the popup.
|
void |
setPresetListener(SpenSettingPenLayout.PresetListener listener)
Set the specified SpenSettingPenLayout.PresetListener to receive Pen preset change events.
|
void |
setPresetSaveEnabled(boolean enable)
Deprecated.
Enable or disable preset save function.
|
void |
setSeekBarChangeListener(SpenSettingPenLayout.SeekBarChangeListener listener)
Set the specified SpenSettingPenLayout.SeekBarChangeListener to receive pen progress level changed
events.
|
void |
setViewMode(int viewMode)
Set the specified view mode.
|
void |
setVisibility(int visibility)
Set the specified visibility mode for the Pen settings view.
|
void |
setVisibilityChangedListener(SpenSettingPenLayout.ViewListener listener)
Set the specified SpenSettingPenLayout.ViewListener to receive visibility changed events.
|
public static final int VIEW_MODE_NORMAL
@Deprecated public static final int VIEW_MODE_MINIMUM
@Deprecated public static final int VIEW_MODE_EXTENSION
@Deprecated public static final int VIEW_MODE_EXTENSION_WITHOUT_PRESET
@Deprecated public static final int VIEW_MODE_TYPE
@Deprecated public static final int VIEW_MODE_SIZE
@Deprecated public static final int VIEW_MODE_COLOR
@Deprecated public static final int VIEW_MODE_PRESET
@Deprecated public static final int VIEW_MODE_TITLE
@Deprecated public static final int VIEW_MODE_EXTENSION_WITHOUT_PRESET_NO_RESIZE
public static final int VIEW_MODE_FAVORITE
public SpenSettingPenLayout(Context context, String customImagePath, RelativeLayout relativeLayout)
context - [in] The Context for application.customImagePath - [in] The path to the image you want to use internally (String)relativeLayout - [in] The upper of the Layout@Deprecated public SpenSettingPenLayout(Context context, String customImagePath, RelativeLayout relativeLayout, float ratio)
SpenSettingPenLayout(Context, String, RelativeLayout).public void requestLayout()
requestLayout in class RelativeLayoutpublic boolean onTouchEvent(MotionEvent event)
onTouchEvent in class Viewpublic void close()
public void loadPreferences()
public void savePreferences()
public void setIndicatorPosition(int x)
x - The X coordinate of the popup indicator in pixels. If X is less than 0
or greater than setting layout's width, indicator will be inVisible.public void setColorPickerPosition(int x,
int y)
x - The X coordinate of the popup color picker in pixels.y - The Y coordinate of the popup color picker in pixels.public void setPosition(int x,
int y)
x - The X coordinate of the popup in pixels.y - The Y coordinate of the popup in pixels.public int getViewMode()
VIEW_MODE_NORMAL, VIEW_MODE_FAVORITE For more information, see
Field Detail in this class
reference.public void setViewMode(int viewMode)
viewMode - The view mode.
The valid values are: VIEW_MODE_NORMAL, VIEW_MODE_FAVORITE For more information, see
Field Detail in this class reference.public void setCanvasView(SpenSettingViewInterface canvasView)
canvasView - The canvas view.public SpenSettingPenInfo getInfo()
public void setInfo(SpenSettingPenInfo settingInfo)
settingInfo - The Pen settings information object. com.samsung.android.sdk.pen#SpenSettingPenInfoIllegalArgumentException - If the info is null.public void setPenInfoList(List<SpenSettingPenInfo> list)
ArrayListtempPenInfoList = new ArrayList (); List mPenList = new ArrayList (); mPenManager.getInfoList(mPenList); int penCount = mPenList.size(); int penInfoCount = mPenInfoList.size(); for (int i = 0; i < mPenList.size(); i++) { PenInfo penInfo = mPenList.get(i); SpenSettingPenInfo info = new SpenSettingPenInfo(); info.alpha = mPen.getAlpha(); info.color = -16777216; info.advancedSetting = ""; info.isCurvable = true; info.name = penInfo.className; info.size = mPen.getSize(); tempPenInfoList.add(info); mSettingViewInterface.setPenSettingInfo(info); } mPenSettingView.setPenInfoList(tempPenInfoList);
list - Listcom.samsung.android.sdk.pen#SpenSettingPenInfopublic void removePen(int penIndex)
penIndex - The index of the pen.public void setBeautifyOptionEnabled(boolean enable)
enable - Set to true to enable the beautify option for Pen, set to false to disable the beautify option for
Pen.@Deprecated public void setPresetSaveEnabled(boolean enable)
enable - Set to true to enable the preset save function, set to false to disable the preset save function.public void setPresetListener(SpenSettingPenLayout.PresetListener listener)
listener - The SpenSettingPenLayout.PresetListener instance to receive Pen preset change events .
SpenSettingPenLayout.PresetListenerpublic void setActionListener(SpenSettingPenLayout.ActionListener listener)
listener - The ActionListener instance to receive Pen settings events. SpenSettingPenLayout.ActionListenerpublic void setSeekBarChangeListener(SpenSettingPenLayout.SeekBarChangeListener listener)
listener - The SeekBarChangeListener instance to receive pen progress level changed events.
SpenSettingPenLayout.SeekBarChangeListenerpublic void setVisibilityChangedListener(SpenSettingPenLayout.ViewListener listener)
listener - The SpenSettingPenLayout.ViewListener instance to receive visibility changed events.
SpenSettingPenLayout.ViewListenerpublic void setVisibility(int visibility)
setVisibility in class Viewvisibility - The visibility mode.