public class SpenSettingBrushLayout extends RelativeLayout
| Modifier and Type | Class and Description |
|---|---|
static interface |
SpenSettingBrushLayout.EventListener |
| Modifier and Type | Field and Description |
|---|---|
static int |
CHILD_TYPE_ERASER
CHILD_TYPE_ERASER
|
static int |
CHILD_TYPE_SETTINGS
CHILD_TYPE_SETTINGS
|
| Constructor and Description |
|---|
SpenSettingBrushLayout(Context context,
RelativeLayout relativeLayout)
Creates an @see SpenSettingBrushLayout instance with relative layout.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the Settings UI.
|
SpenSettingPenInfo |
getInfo()
Get the brush settings information.
|
boolean |
onInterceptTouchEvent(MotionEvent ev)
override api in android ViewGroup.onInterceptTouchEvent(MotionEvent ev)
|
void |
setCanvasView(SpenSettingViewInterface canvasView)
Set the specified canvas view.
|
void |
setChildLayoutParams(int type,
RelativeLayout.LayoutParams layoutParams)
Set ChildLayoutParams
Set the childLayout's layoutParams
|
void |
setEraserListener(SpenSettingBrushLayout.EventListener listener)
setEraserListener
|
void |
setEraserPen()
Set EraserPen (set Eraser mode)
|
void |
setInfo(SpenSettingPenInfo settingInfo)
Set the specified brush settings information.
|
boolean |
setPenDegree(int degree)
Called when you want to change the direction of Pen.
|
void |
setPenInfoList(List<SpenSettingPenInfo> list)
set up the pen setting infomation list
|
boolean |
setSelectorDegree(int degree)
Called when you want to change the direction of color selector
Note that it is only changed to the direction of color selector (The size of view is not changed)
degree value is possible 0 or 90.
|
void |
setVisibility(int visibility)
Set the specified visibility mode for the Pen settings view.
|
public static final int CHILD_TYPE_SETTINGS
public static final int CHILD_TYPE_ERASER
public SpenSettingBrushLayout(Context context, RelativeLayout relativeLayout)
context - [in] The Context for application.relativeLayout - [in] The upper of the Layoutpublic boolean onInterceptTouchEvent(MotionEvent ev)
onInterceptTouchEvent in class ViewGrouppublic void setEraserListener(SpenSettingBrushLayout.EventListener listener)
listener - EventListenerpublic void close()
public void setEraserPen()
public void setCanvasView(SpenSettingViewInterface canvasView)
canvasView - The canvas view.public SpenSettingPenInfo getInfo()
public void setInfo(SpenSettingPenInfo settingInfo)
settingInfo - The Brush settings information object. 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 - ListSpenSettingPenInfopublic void setVisibility(int visibility)
setVisibility in class Viewvisibility - The visibility mode.public boolean setPenDegree(int degree)
degree - public boolean setSelectorDegree(int degree)
degree - public void setChildLayoutParams(int type,
RelativeLayout.LayoutParams layoutParams)
type - [in] Type ChildLayout (CHILD_TYPE_SETTING : Setting Popup, CHILD_TYPE_ERASER : ERASER Popup)layoutParams - [in] The layoutParams of child layout type