public class SpenSettingPenLayout extends RelativeLayout
| Modifier and Type | Class and Description |
|---|---|
static interface |
SpenSettingPenLayout.PresetListener
Deprecated.
|
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_EXTENSION
Deprecated.
|
static int |
VIEW_MODE_FAVORITE
Deprecated.
|
static int |
VIEW_MODE_NORMAL
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.
|
SpenSettingPenLayout(Context context,
String customImagePath,
RelativeLayout relativeLayout,
int penListType) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the Settings UI.
|
SpenSettingPenInfo |
getInfo()
Get the pen settings information.
|
int |
getViewMode()
Deprecated.
|
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 |
setCanvasView(SpenSettingViewInterface canvasView)
Set the specified canvas view.
|
void |
setColorPickerPosition(int x,
int y)
Deprecated.
|
void |
setColorSpoidPosition(int x,
int y)
Set the specified position for the popup color spoid.
|
void |
setIndicatorPosition(int x)
Deprecated.
|
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)
Deprecated.
|
void |
setPresetListener(SpenSettingPenLayout.PresetListener listener)
Deprecated.
|
void |
setViewMode(int viewMode)
Deprecated.
|
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.
|
@Deprecated public static final int VIEW_MODE_NORMAL
@Deprecated public static final int VIEW_MODE_EXTENSION
@Deprecated public static final int VIEW_MODE_FAVORITE
public SpenSettingPenLayout(Context context, String customImagePath, RelativeLayout relativeLayout)
The following parameters must be not null.
Pen Setting Layout does not support (RTL) Right To Left mirroring, therefore, please set layout direction
View.LAYOUT_DIRECTION_LTR for its parent view so that SDK can have normal display and operation.
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 SpenSettingPenLayout(Context context, String customImagePath, RelativeLayout relativeLayout, int penListType)
public void requestLayout()
requestLayout in class RelativeLayoutpublic boolean onTouchEvent(MotionEvent event)
onTouchEvent in class Viewpublic void close()
public void loadPreferences()
public void savePreferences()
@Deprecated 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.@Deprecated 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 setColorSpoidPosition(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.@Deprecated 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.@Deprecated public int getViewMode()
VIEW_MODE_NORMAL, VIEW_MODE_FAVORITE For more information, see
Field Detail in this class
reference.@Deprecated 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)
Pen settings information must be not null.
settingInfo - The Pen settings information object.IllegalArgumentException - 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 - Listpublic void removePen(int penIndex)
penIndex - The index of the pen.public 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.@Deprecated public void setPresetListener(SpenSettingPenLayout.PresetListener listener)