Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master 2 #110

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat:provide zh and en document switching
zzzzwb committed Nov 17, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 06cf79cf21f0c987005b55df897285f88186e5ae
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

74 changes: 74 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions doc/Eink-Develop-Guide_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# UI/UX

## BOOX Eink设备上的应用开发适配建议:

1. 页面颜色尽量黑白为主,如若有状态切换需要,尽可能保证颜色在256级灰度上.
2. 避免透明度遮罩图片/文字.
3. 使用翻页实现替代跟随划屏.(九宫格/单行列更替内容实现列表加载)
4. 避免使用动画过场/转场.
5. 字体大小不小于14sp,如果有嵌入字体的需求,尽可能使用黑体或粗体.
6. 中心区域按钮原则上不小于36dp x 36dp,边缘区域按钮大小不小于48dp x 48dp.