From a1b5225c9c98a430567abb1f3fe03b5aa7784b17 Mon Sep 17 00:00:00 2001 From: zzzzwb Date: Fri, 17 Nov 2023 16:09:43 +0800 Subject: [PATCH 1/2] feat:add Eink develop guide doc. http://oa.o-in.me:9068/issues/184966 --- README.md | 4 ++++ doc/Eink-Develop-Guide.md | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 doc/Eink-Develop-Guide.md diff --git a/README.md b/README.md index 705bf639..20198256 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ The SDK also provides additional functionality such as a move eraser, inking on * [AppOpenGuide](doc/AppOpenGuide.md): opening an app using the Android Debug Bridge (adb) +## 8. Eink Develop Guide + +* [EinkDevelopGuide](doc/Eink-Develop-Guide.md): Eink Develop Guide documentation + ## PRs Welcome All contributions towards documentation, adding/improving unit tests, and examples are appreciated. diff --git a/doc/Eink-Develop-Guide.md b/doc/Eink-Develop-Guide.md new file mode 100644 index 00000000..04c1d821 --- /dev/null +++ b/doc/Eink-Develop-Guide.md @@ -0,0 +1,15 @@ +# UI/UX + +## How to develop Apps for BOOX eink device + +Because of the eink feture, the refresh rate in eink device is much lower than normal LCD tablet, +to ensure App runs smoothly and give users good using experience, we would like to provide following suggestion when develop Apps + +1. Pls use black and white (16 level gray scale) as the main color of pages; +If need to change the color for state switching, pls try to ensure that the color is in the 256 level gray scale. +2. Pls don’t add transparent layers on images or texts; +3. Pls use the page based way to load more contents; +4. Pls try to avoid animation, such as scrolling/dragging etc. +5. The font size should not be smaller than 14sp; +If embed fonts are needed, pls use bold or bold as much as possible +6. Normally, the button icon in the central area should not be smaller than 36dp x 36dp. The button icon in the edge area should not be smaller than 48dp x 48dp. \ No newline at end of file From 06cf79cf21f0c987005b55df897285f88186e5ae Mon Sep 17 00:00:00 2001 From: zzzzwb Date: Fri, 17 Nov 2023 16:10:39 +0800 Subject: [PATCH 2/2] feat:provide zh and en document switching http://oa.o-in.me:9068/issues/184966 --- README.md | 2 + README_zh.md | 74 ++++++++++++++++++++++++++++++++++++ doc/Eink-Develop-Guide_zh.md | 10 +++++ 3 files changed, 86 insertions(+) create mode 100644 README_zh.md create mode 100644 doc/Eink-Develop-Guide_zh.md diff --git a/README.md b/README.md index 20198256..92b4984a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +##### 📖 English Documentation | 📖 [中文文档](README_zh.md) + # Overview Sample project of SDKs from Onyx-Intl, including [onyxsdk-base](doc/Onyx-Base-SDK.md), [onyxsdk-scribble](doc/Onyx-Scribble-SDK.md), [onyxsdk-pen](doc/Onyx-Pen-SDK.md) diff --git a/README_zh.md b/README_zh.md new file mode 100644 index 00000000..ac9315a8 --- /dev/null +++ b/README_zh.md @@ -0,0 +1,74 @@ +##### [📖 English Documentation](README.md) | 📖 中文文档 + +# Overview +Sample project of SDKs from Onyx-Intl, including [onyxsdk-base](doc/Onyx-Base-SDK.md), [onyxsdk-scribble](doc/Onyx-Scribble-SDK.md), [onyxsdk-pen](doc/Onyx-Pen-SDK.md) + +To use the SDK, please include the following dependencies in your build.gradle: +```gradle + implementation('com.onyx.android.sdk:onyxsdk-device:1.1.11') + implementation('com.onyx.android.sdk:onyxsdk-pen:1.2.1') +``` + + +The `onyxsdk-scribble` SDK has a dependency on the `dbflow` library which is hosted in the jitpack repository. This can be added in your project's build.gradle with the following entry: +```gradle + maven { url "https://jitpack.io" } + + maven { url "http://repo.boox.com/repository/maven-public/" } + +``` + +# Demo +This repository contains the following examples: + +## 1. Screen +* [EPDDemoActivity](app/src/main/java/com/android/onyx/demo/EpdDemoActivity.java): basic demo of [refreshing the EPD Screen](doc/EPD-Screen-Update.md) with the [EpdController](doc/EpdController.md) +* [FrontLightDemoActivity](app/src/main/java/com/android/onyx/demo/FrontLightDemoActivity.java): demo of [FrontLightController](doc/FrontLightController.md). If a device includes a frontLight, the screen brightness can be adjusted. +* [FullScreenDemoActivity](app/src/main/java/com/android/onyx/demo/FullScreenDemoActivity.java): demontrates full screen switching. The `DeviceUtils.setFullScreenOnResume(this, fullscreen)` API call is supported on all devices. +* [RefreshModeDemoActivity](app/src/main/java/com/android/onyx/demo/RefreshModeDemoActivity.java): show how to change app refresh mode, Characteristics of refresh mode can see [Update Mode](doc/EPD-Update-Mode.md) + +## 2. Storage (SD Card) +* [EnvironmentDemoActivity](app/src/main/java/com/android/onyx/demo/EnvironmentDemoActivity.java): shows how to use [DeviceEnvironment](doc/DeviceEnvironment.md) to access internal storage or the removable SD card + +## 3. Inking +The following examples demonstrate the use of the [onyxsdk-pen](doc/Onyx-Pen-SDK.md) APIs. + +Any type of view can be a drawing target, e.g. a SurfaceView or a WebView. Relative coordinates appropriate to the the view being used are provided. + +* [ScribbleTouchHelperDemoActivity](app/src/main/java/com/android/onyx/demo/scribble/ScribbleTouchHelperDemoActivity.java) is an example demonstrating the use of TouchHelper, a simplified drawing API, with a SurfaceView. On touch-enabled devices, fingers can be used for drawing. + +* [ScribbleWebViewDemoActivity](app/src/main/java/com/android/onyx/demo/scribble/ScribbleWebViewDemoActivity.java): shows how a WebView can be used to load a Web page and then apply ink to it + +The SDK also provides additional functionality such as a move eraser, inking on multiple views, and saving ink strokes. + +* [ScribbleMoveEraserDemoActivity](app/src/main/java/com/android/onyx/demo/scribble/ScribbleMoveEraserDemoActivity.java): using the move eraser + +* [ScribbleMultipleScribbleViewActivity](app/src/main/java/com/android/onyx/demo/scribble/ScribbleMultipleScribbleViewActivity.java): inking with multiple views + + +## 4. Screensaver + +* [ScreensaverActivity](app/src/main/java/com/android/onyx/demo/ScreensaverActivity.java): setting a screensaver + +## 5. Settings + +* [OpenSettingActivity](app/src/main/java/com/android/onyx/demo/OpenSettingActivity.java): opening a settings page + +## 6. Misc API +* **DictionaryUtil** can be used to query the dictionary. For details see [DictionaryActivity](./app/src/main/java/com/android/onyx/demo/DictionaryActivity.java) + +## 7. App Open Guide + +* [AppOpenGuide](doc/AppOpenGuide.md): opening an app using the Android Debug Bridge (adb) + +## 8. 墨水屏开发指南 + +* [墨水屏开发指南](doc/Eink-Develop-Guide_zh.md): 墨水屏开发指南文档 + +## PRs Welcome + +All contributions towards documentation, adding/improving unit tests, and examples are appreciated. + +- Please comment as much as possible. +- Commit message format should follow [AngularJS's commit message convention.](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#-git-commit-guidelines). +- Please keep changes for each commit as small as possible. diff --git a/doc/Eink-Develop-Guide_zh.md b/doc/Eink-Develop-Guide_zh.md new file mode 100644 index 00000000..8bc9abd5 --- /dev/null +++ b/doc/Eink-Develop-Guide_zh.md @@ -0,0 +1,10 @@ +# UI/UX + +## BOOX Eink设备上的应用开发适配建议: + +1. 页面颜色尽量黑白为主,如若有状态切换需要,尽可能保证颜色在256级灰度上. +2. 避免透明度遮罩图片/文字. +3. 使用翻页实现替代跟随划屏.(九宫格/单行列更替内容实现列表加载) +4. 避免使用动画过场/转场. +5. 字体大小不小于14sp,如果有嵌入字体的需求,尽可能使用黑体或粗体. +6. 中心区域按钮原则上不小于36dp x 36dp,边缘区域按钮大小不小于48dp x 48dp. \ No newline at end of file