### Handling Eraser and Quick Start Keys - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md This `onKeyDown` snippet shows how to detect specific key presses, such as the left/right ALT keys (potentially for an eraser function) and the BUTTON_START key (for a quick start feature), allowing the application to handle these hardware button events. ```Java @Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_ALT_LEFT: case KeyEvent.KEYCODE_ALT_RIGHT: // eraser has been pressed return false; case KeyEvent.KEYCODE_BUTTON_START: // the quick start button has been pressed. return false; default: return super.onKeyDown(activity,keyCode,event); } } ``` -------------------------------- ### Implement RawInputCallback for Touch Data (Java) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Pen-SDK.md Provides an example implementation of the `RawInputCallback` interface. This interface defines methods to handle the beginning, end, and movement of touch points for both drawing and erasing actions, allowing the application to process the raw stylus data. ```java new RawInputCallback() { @Override public void onBeginRawDrawing(boolean b, TouchPoint touchPoint) { // begin of stylus data } @Override public void onEndRawDrawing(boolean b, TouchPoint touchPoint) { // end of stylus data } @Override public void onRawDrawingTouchPointMoveReceived(TouchPoint touchPoint) { // stylus data during stylus moving } @Override public void onRawDrawingTouchPointListReceived(TouchPointList touchPointList) { // cumulation of stylus data of stylus moving, you will receive it before onEndRawDrawing } @Override public void onBeginRawErasing(boolean b, TouchPoint touchPoint) { // same as RawData, but triggered by stylus eraser button } @Override public void onEndRawErasing(boolean b, TouchPoint touchPoint) { // same as RawData, but triggered by stylus eraser button } @Override public void onRawErasingTouchPointMoveReceived(TouchPoint touchPoint) { // same as RawData, but triggered by stylus eraser button } @Override public void onRawErasingTouchPointListReceived(TouchPointList touchPointList) { // same as RawData, but triggered by stylus eraser button } }; ``` -------------------------------- ### Open Onyx Book Shop via ADB Shell Intent Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/AppOpenGuide.md Launches the Onyx Book Shop application by executing the `am start` command within the ADB shell. This command includes an intent extra (`--es`) named 'json' carrying a JSON string to specify the 'OPEN_SHOP' action. ```Shell am start -n com.onyx/.main.ui.MainActivity --es "json" "{'action':'OPEN_SHOP'}" ``` -------------------------------- ### Handling Scribble Events with EventBus (Java) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-TouchHelper-API.md This snippet provides examples of EventBus subscriber methods (@Subscribe) used to receive various touch and erasing events generated by the TouchHelper. These events deliver data related to stylus movement, drawing, and erasing actions. ```Java @Subscribe public void onErasingTouchEvent(ErasingTouchEvent e) { // ignore } @Subscribe public void onDrawingTouchEvent(DrawingTouchEvent e) { // ignore } @Subscribe public void onBeginRawDataEvent(BeginRawDataEvent e) { // begin of stylus data } @Subscribe public void onEndRawDataEvent(EndRawDataEvent e) { // end of stylus data } @Subscribe public void onRawTouchPointMoveReceivedEvent(RawTouchPointMoveReceivedEvent e) { // stylus data during stylus moving } @Subscribe public void onRawTouchPointListReceivedEvent(RawTouchPointListReceivedEvent e) { // cumulation of stylus data of stylus moving, you will receive it before onEndRawDataEvent } @Subscribe public void onRawErasingStartEvent(BeginRawErasingEvent e) { // same as RawData, but triggered by stylus eraser button } @Subscribe public void onRawErasingFinishEvent(RawErasePointListReceivedEvent e) { // same as RawData, but triggered by stylus eraser button } @Subscribe public void onRawErasePointMoveReceivedEvent(RawErasePointMoveReceivedEvent e) { // same as RawData, but triggered by stylus eraser button } @Subscribe public void onRawErasePointListReceivedEvent(RawErasePointListReceivedEvent e) { // same as RawData, but triggered by stylus eraser button } ``` -------------------------------- ### Open Onyx Note App via ADB Shell Intent Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/AppOpenGuide.md Launches the Onyx Note application by executing the `am start` command within the ADB shell. This command includes an intent extra (`--es`) named 'json' carrying a JSON string to specify the 'OPEN_NOTE' action. ```Shell am start -n com.onyx/.main.ui.MainActivity --es "json" "{'action':'OPEN_NOTE'}" ``` -------------------------------- ### Getting Removable SD Card Directory in Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/DeviceEnvironment.md This code snippet calls a static method to obtain the file path string for the removable SD card on the device. It is likely part of a larger utility class designed for interacting with the device environment. ```Java DeviceEnvironment.getRemovableSDCardDirectory() ``` -------------------------------- ### Get Touch Function State - EpdController - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Touch.md Checks the current state of the touch function. Returns true if touch is disabled, false if touch is enabled. ```Java /** * @param context * @return boolean * if true touch is disable, otherwise touch is enable */ boolean isCTPDisableRegion(Context context) ``` -------------------------------- ### Adding Onyx SDK Repositories (Gradle) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/README_zh.md These lines add the required Maven repositories (`jitpack.io` and `repo.boox.com`) to the project's `build.gradle` file, which are necessary to download the Onyx SDK dependencies, including the `dbflow` library dependency for `onyxsdk-scribble`. ```gradle maven { url "https://jitpack.io" } maven { url "http://repo.boox.com/repository/maven-public/" } ``` -------------------------------- ### Initialize TouchHelper for Raw Drawing (Java) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Pen-SDK.md Creates a `TouchHelper` instance associated with a specific view and a `RawInputCallback`. It configures the stroke width, sets optional drawing limits and exclusions, and opens raw drawing mode. ```java TouchHelper.create(view, callback) .setStrokeWidth(3.0f) .setLimitRect(limit, exclude) .openRawDrawing(); ``` -------------------------------- ### Adding Onyx SDK Dependencies (Gradle) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/README_zh.md These lines add the necessary Onyx SDK libraries (`onyxsdk-device`, `onyxsdk-pen`) as dependencies to the Android project's `build.gradle` file, allowing the project to use the SDK functionalities. ```gradle implementation('com.onyx.android.sdk:onyxsdk-device:1.1.11') implementation('com.onyx.android.sdk:onyxsdk-pen:1.2.1') ``` -------------------------------- ### Initializing TouchHelper for Scribble (Java) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-TouchHelper-API.md This snippet shows the chained method calls to initialize and configure the TouchHelper instance. It sets the target view, stroke width, enables raw input, defines the drawing area with optional exclusions, and finally opens the raw drawing mode. ```Java touchHelper.setup(view) .setStrokeWidth(3.0f) .setUseRawInput(true) .setLimitRect(limit, exclude) .openRawDrawing(); ``` -------------------------------- ### Adding Onyx SDK Dependencies to build.gradle Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/README.md To integrate the Onyx SDKs into your Android project, include the following implementation dependencies in your module's build.gradle file. This adds the device and pen SDK components. ```gradle implementation('com.onyx.android.sdk:onyxsdk-device:1.1.11') implementation('com.onyx.android.sdk:onyxsdk-pen:1.2.1') ``` -------------------------------- ### Adding Required Repositories to build.gradle Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/README.md Some Onyx SDK components, like onyxsdk-scribble which depends on dbflow, are hosted in specific repositories. Add these maven repository entries to your project's build.gradle file to resolve these dependencies. ```gradle maven { url "https://jitpack.io" } maven { url "http://repo.boox.com/repository/maven-public/" } ``` -------------------------------- ### Add Pen SDK Dependency (Gradle) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Pen-SDK.md Adds the `onyxsdk-pen` library as a compilation dependency in the app's `build.gradle` file. This is the first step to include the SDK in an Android project. ```gradle compile('com.onyx.android.sdk:onyxsdk-pen:1.4.11') ``` -------------------------------- ### Open Onyx App via ADB Shell Component Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/AppOpenGuide.md Launches a standard Onyx application using its component name via the Android Debug Bridge (ADB) shell. Replace `` with the specific component string for the desired app listed in the table. ```Shell adb shell am start -n ``` -------------------------------- ### Drawing Lines with moveTo and lineTo - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md The SDK provides `moveTo` and `lineTo` functions to draw lines. Coordinates (x, y) can be in view coordinates. A specific overload of `moveTo` is available for M96 devices that takes the view as a parameter. ```Java Device.currentDevice().moveTo(x, y, lineWidth); ``` ```Java Device.currentDevice().lineTo(x, y, UpdateMode.DU); ``` ```Java Device.currentDevice().moveTo(view, x, y, lineWidth); ``` -------------------------------- ### Adding Onyx-Intl SDK Modules Dependencies (Gradle) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Data-SDK.md Specifies the Gradle dependencies for the core Onyx-Intl SDK modules: onyxsdk-base and onyxsdk-data. These lines should be added to the `dependencies` block in the module-level `build.gradle` file. ```Gradle compile 'com.onyx.android.sdk:onyxsdk-base:1.3.7' compile 'com.onyx.android.sdk:onyxsdk-data:1.0.1' ``` -------------------------------- ### Describe BrushRender drawStroke Method (Java) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Pen-SDK.md Documents the `drawStroke` static method in the `BrushRender` class. This method is used to render a list of `TouchPoint`s onto a `Canvas`, taking into account stroke width and touch pressure for rendering pressure-sensitive strokes. ```java /** * * @param canvas * @param paint * @param points * @param strokeWidth * @param maxTouchPressure * invoke EpdController.getMaxTouchPressure() to get pressure parameter */ public static void drawStroke(final Canvas canvas,final Paint paint,final List points,final float strokeWidth,final float maxTouchPressure) ``` -------------------------------- ### Forcing Full GC Update - EpdDeviceManager - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EpdDeviceManager.md Forces an immediate full screen update (GC update), bypassing the automatic interval logic. ```Java EpdDeviceManager.applyGCUpdate(textView); ``` -------------------------------- ### Add Jitpack Maven Repository (Gradle) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Scribble-SDK.md Since the onyxsdk-scribble SDK includes the dbflow library from Jitpack, you must add the Jitpack Maven repository to your project's top-level build.gradle file to resolve dependencies correctly. ```Gradle maven { url "https://jitpack.io" } ``` -------------------------------- ### Adding Onyx-Intl SDK Base Module Dependencies (Gradle) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Data-SDK.md Lists the additional Gradle dependencies required by the onyxsdk-base module. These dependencies include DBFlow for database operations, Apache Commons, Fastjson, Retrofit2, FileDownloader, OkHttp, Aliyun OSS SDK, and Tencent WeChat SDK. ```Gradle apt "com.github.Raizlabs.DBFlow:dbflow-processor:$rootProject.dbflowVersion" compile "com.github.Raizlabs.DBFlow:dbflow-core:$rootProject.dbflowVersion" compile "com.github.Raizlabs.DBFlow:dbflow:$rootProject.dbflowVersion" compile "org.apache.commons:commons-collections4:$rootProject.apachecommonsVersion" compile "com.alibaba:fastjson:$rootProject.fastjsonVersion" compile "com.squareup.retrofit2:retrofit:$rootProject.retrofit2Version" compile "com.liulishuo.filedownloader:library:$rootProject.filedownloaderVersion" compile "com.squareup.okhttp:okhttp-urlconnection:$rootProject.okhttpurlconnectionVersion" compile "com.aliyun.dpa:oss-android-sdk:$rootProject.aliyunOssSdkVersion" compile "com.tencent.mm.opensdk:wechat-sdk-android-with-mta:$rootProject.wechatSdkWithMtaVersion" ``` -------------------------------- ### Scribble Touch Event Handling - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md This `ScribbleActivity` snippet shows how to handle touch events (`onTouchEvent`) to initiate (`startStroke`), add points (`addStrokePoint`), and finish (`finishStroke`) a scribble stroke, mapping touch coordinates and passing pressure, size, and time. ```Java public class ScribbleActivity extends Activity { public boolean onTouchEvent(ScribbleActivity activity, MotionEvent e) { // ignore multi touch if (e.getPointerCount() > 1) { return false; } final float baseWidth = 5; paintView.init(paintView.getWidth(), paintView.getHeight()); switch (e.getAction() & MotionEvent.ACTION_MASK) { case (MotionEvent.ACTION_DOWN): float dst[] = paintView.mapPoint(e.getX(), e.getY()); Device.currentDevice().startStroke(baseWidth, dst[0], dst[1], e.getPressure(), e.getSize(), e.getEventTime()); return true; case (MotionEvent.ACTION_CANCEL): case (MotionEvent.ACTION_OUTSIDE): break; case MotionEvent.ACTION_UP: dst = paintView.mapPoint(e.getX(), e.getY()); Device.currentDevice().finishStroke(baseWidth, dst[0], dst[1], e.getPressure(), e.getSize(), e.getEventTime()); return true; case MotionEvent.ACTION_MOVE: int n = e.getHistorySize(); for (int i = 0; i < n; i++) { dst = paintView.mapPoint(e.getHistoricalX(i), e.getHistoricalY(i)); Device.currentDevice().addStrokePoint(baseWidth, dst[0], dst[1], e.getPressure(), e.getSize(), e.getEventTime()); } dst = paintView.mapPoint(e.getX(), e.getY()); Device.currentDevice().addStrokePoint(baseWidth, dst[0], dst[1], e.getPressure(), e.getSize(), e.getEventTime()); return true; default: break; } return true; } } ``` -------------------------------- ### Entering Animation Update Mode - EpdDeviceManager - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EpdDeviceManager.md Enters a mode optimized for faster, more frequent updates, suitable for animations or dynamic content. The boolean parameter typically controls whether to clear the screen first. ```Java EpdDeviceManager.enterAnimationUpdate(true); ``` -------------------------------- ### Applying Update with GC Interval - EpdDeviceManager - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EpdDeviceManager.md Applies a screen update using the configured GC interval logic. The manager automatically selects the appropriate partial update method (normal/regal) based on the device type. ```Java EpdDeviceManager.applyWithGCInterval(textView, isTextPage); ``` -------------------------------- ### Adding Onyx Android SDK Base Dependency (Gradle) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Base-SDK.md This snippet shows the Gradle dependency statement required to include the Onyx Android SDK Base library in an Android project. It specifies the exact version (1.4.3.7) to be used. ```Gradle compile ('com.onyx.android.sdk:onyxsdk-base:1.4.3.7') ``` -------------------------------- ### Declare WRITE_SETTINGS Permission in Android Manifest (XML) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/FrontLightController.md Declares the necessary permission in the AndroidManifest.xml file to allow the application to modify system settings, specifically for controlling the front light. ```XML ``` -------------------------------- ### Entering and Leaving Scribble Mode - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md Before using the scribble feature, the application must request the framework to enter scribble mode using `enterScribbleMode`. When finished, `leaveScribbleMode` should be called. Note that during scribble mode, other screen update requests are ignored. ```Java Device.currentDevice().enterScribbleMode(view); ``` ```Java Device.currentDevice().leaveScribbleMode(view); ``` -------------------------------- ### Setting GC Interval - EpdDeviceManager - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EpdDeviceManager.md Sets the interval for garbage collection (GC) updates, which influences how often full screen updates occur automatically to prevent ghosting. ```Java EpdDeviceManager.setGcInterval(THE_INTERVAL_YOU_WANT_TO_SET); ``` -------------------------------- ### PaintView Class for Coordinate Mapping - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md This `PaintView` class snippet demonstrates how to map view coordinates (x, y) to screen coordinates and then transform them using a matrix, likely for accurate drawing relative to the view's position on the screen. ```Java public class PaintView extends View { float [] mapPoint(float x, float y) { int viewLocation[] = {0, 0}; getLocationOnScreen(viewLocation); float screenPoints[] = {viewLocation[0] + x, viewLocation[1] + y}; float dst[] = {0, 0}; matrix.mapPoints(dst, screenPoints); return dst; } } ``` -------------------------------- ### Add Scribble SDK Dependency (Gradle) Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Onyx-Scribble-SDK.md Include the Onyx Scribble SDK in your Android project by adding this dependency statement to your module's build.gradle file. ```Gradle compile 'com.onyx.android.sdk:onyxsdk-scribble:1.0.8' ``` -------------------------------- ### Set WebView Contrast Optimize - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EpdController.md This static method is provided to prevent a WebView instance from entering A2 mode, which can be beneficial for rendering performance and quality on EPD screens. It takes the WebView instance and a boolean flag to enable or disable the optimization. ```Java /** * * @param view The WebView instance to apply the optimization to. * @param enabled True to enable the contrast optimization (prevent A2 mode), false otherwise. */ public static void setWebViewContrastOptimize(WebView view, boolean enabled) ``` -------------------------------- ### Querying Dictionary Keyword - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/DictionaryUtils-API.md Queries a dictionary for a specific keyword. This method may block the calling thread and should not be invoked on the UI thread. It takes a Context and the keyword string as input and returns a `DictionaryQuery` object containing the results. ```Java /** * * @param context * @param keyword * @return DictionaryQuery * */ public static DictionaryQuery queryKeyWord(Context context, String keyword) ``` -------------------------------- ### Setting Default Update Mode to Partial (GU) - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Screen-Update.md Sets the default update mode for a specific view to Partial (GU). This is typically the default update mode used for general content updates. ```Java EpdController.setViewDefaultUpdateMode(view, UpdateMode.GU); ``` -------------------------------- ### Entering Fast (Animation) Mode - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Screen-Update.md Enters the Fast (Animation) mode for the application. This mode is a black/white update mode designed for rapid screen updates required during actions like zooming, scrolling, or dragging. ```Java EpdController.applyApplicationFastMode(APP, true, clear); ``` -------------------------------- ### Stroke Point Function Signatures - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md These are the function signatures for managing stroke points: `startStroke` to begin, `addStrokePoint` for intermediate points, and `finishStroke` to end a stroke. They return the calculated line width, which the application may need to store. ```Java public static float startStroke(float baseWidth, float x, float y, float pressure, float size, float time); public static float addStrokePoint(float baseWidth, float x, float y, float pressure, float size, float time); public static float finishStroke(float baseWidth, float x, float y, float pressure, float size, float time) ; ``` -------------------------------- ### Exiting Animation Update Mode - EpdDeviceManager - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EpdDeviceManager.md Exits the fast update mode and returns to the standard EPD update behavior. The boolean parameter typically controls whether to perform a full update upon exiting. ```Java EpdDeviceManager.exitAnimationUpdate(true); ``` -------------------------------- ### Setting Painter Style - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md The painter style, controlling aspects like anti-aliasing, stroke style (FILL_AND_STROKE), join style (ROUND), and cap style (ROUND), can be configured using `setPainterStyle`. ```Java Device.currentDevice().setPainterStyle(true, // antiAlias or not Paint.Style.FILL_AND_STROKE, // stroke style Paint.Join.ROUND, // join style Paint.Cap.ROUND); // cap style ``` -------------------------------- ### Performing Full Screen Update (GC) - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Screen-Update.md Triggers a full screen update (GC) for a specific view. This mode redraws the entire screen and is often used for significant content changes or to clear ghosting. ```Java EpdController.invalidate(view, UpdateMode.GC); ``` -------------------------------- ### Leaving Fast (Animation) Mode - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Screen-Update.md Leaves the Fast (Animation) mode for the application. This returns the display to the previous update mode, typically after a fast-updating action is completed. ```Java EpdController.applyApplicationFastMode(APP, false, clear); ``` -------------------------------- ### Setting Default Update Mode to Regal Partial (REGAL) - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Screen-Update.md Sets the default update mode for a specific view to Regal Partial (REGAL). This mode is an optimized partial update mode particularly suitable for displaying text pages. ```Java EpdController.setViewDefaultUpdateMode(view, UpdateMode.REGAL); ``` -------------------------------- ### Setting Stroke Style - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md The stroke style can be adjusted using `setStrokeStyle`. Supported styles include pen style (0), where line width is constant, and brush style (1), where line width changes based on pressure or speed. ```Java // only pen style and brush style supported. Device.currentDevice().setStrokeStyle(0); // pen style, the line width will not be changed Device.currentDevice().setStrokeStyle(1); // brush style, line width will be changed when pressure or speed changed. ``` -------------------------------- ### Set Disabled and Excluded Touch Regions - EpdController - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Touch.md Sets the regions where touch should be disabled, while also defining specific areas within the disabled regions where touch should remain enabled (excluded regions). ```Java /** * @param context * @param disableRegions * the regions that you want to disable touch * @param excludeRegions * the regions that your want to exclude from disabled touch area */ void setAppCTPDisableRegion(Context context, Rect[] disableRegions, Rect[] excludeRegions) ``` -------------------------------- ### Reset Touch Function - EpdController - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Touch.md Resets the touch function to its default state, which means the entire screen is touch-enabled. ```Java /** * @param context */ void appResetCTPDisableRegion(Context context) ``` -------------------------------- ### Set Disabled Touch Regions (int[]) - EpdController - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Touch.md Sets the specific regions on the screen where touch should be disabled using an array of integers representing Rect coordinates (left, top, right, bottom). This is an alternative method to using Rect objects. ```Java /** * @param context * @param disableRegionArray * a array of rect which four point order by left, top, right, bottom */ void setAppCTPDisableRegion(Context context, int[] disableRegionArray) ``` -------------------------------- ### Set Disabled Touch Regions (Rect[]) - EpdController - Java Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/EPD-Touch.md Sets the specific regions on the screen where touch should be disabled using an array of Rect objects. This is the suggested method for defining disabled areas. ```Java /** * @param context * @param disableRegions * the regions that you want to disable touch */ void setAppCTPDisableRegion(Context context, Rect[] disableRegions); ``` -------------------------------- ### Setting Stroke Color - Onyx Android SDK Source: https://github.com/onyx-intl/onyxandroiddemo/blob/master/doc/Scribble-API.md The stroke color can be changed using `setStrokeColor`. Due to e-ink display limitations, currently only black (0xff000000) and white (0xffffffff) are supported. ```Java // so far, only black and white are supported due to eink display limit. Device.currentDevice().setStrokeColor(0xff000000); // black Device.currentDevice().setStrokeColor(0xffffffff); // white ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.