backList = new ArrayList<>();
91 | for(int j = 0; j < occlusionItemList.size(); j ++){
92 | OcclusionItem copiedItem = occlusionItemList.get(j).clone();
93 | if(j == i){//this is the item to hide
94 | copiedItem.highlight = true;
95 | copiedItem.color = mySettings.getOcclusionColorHighlight();
96 | frontList.add(copiedItem);
97 | }else{
98 | frontList.add(copiedItem);
99 | backList.add(copiedItem.clone());
100 | }
101 | }
102 | OcclusionObject occlusionObject = new OcclusionObject(
103 | version,
104 | img,
105 | width,
106 | height,
107 | frontList,
108 | backList
109 | );
110 | occlusionObjectList.add(occlusionObject);
111 | }
112 | }
113 |
114 | return occlusionObjectList;
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mmjang/ankillusion/data/OperationResult.java:
--------------------------------------------------------------------------------
1 | package com.mmjang.ankillusion.data;
2 |
3 | public class OperationResult {
4 | private boolean success;
5 | private String message;
6 | private Object result;
7 |
8 | public OperationResult(boolean success, String message) {
9 | this.success = success;
10 | this.message = message;
11 | }
12 |
13 | public OperationResult(boolean success, String message, Object result){
14 | this.success = success;
15 | this.message = message;
16 | this.result = result;
17 | }
18 |
19 | public boolean isSuccess() {
20 | return success;
21 | }
22 |
23 | public void setSuccess(boolean success) {
24 | this.success = success;
25 | }
26 |
27 | public String getMessage() {
28 | return message;
29 | }
30 |
31 | public void setMessage(String message) {
32 | this.message = message;
33 | }
34 |
35 | public Object getResult() {
36 | return result;
37 | }
38 |
39 | public void setResult(Object result) {
40 | this.result = result;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mmjang/ankillusion/ui/AboutActivity.java:
--------------------------------------------------------------------------------
1 | package com.mmjang.ankillusion.ui;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.support.v4.app.NavUtils;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.os.Bundle;
8 | import android.text.method.LinkMovementMethod;
9 | import android.view.Menu;
10 | import android.view.MenuInflater;
11 | import android.view.MenuItem;
12 | import android.view.View;
13 | import android.widget.ImageView;
14 | import android.widget.TextView;
15 | import android.widget.Toast;
16 |
17 | import com.mmjang.ankillusion.BuildConfig;
18 | import com.mmjang.ankillusion.R;
19 |
20 | public class AboutActivity extends AppCompatActivity {
21 |
22 | TextView mTextViewAboutInformation;
23 | @Override
24 | protected void onCreate(Bundle savedInstanceState) {
25 | super.onCreate(savedInstanceState);
26 | setContentView(R.layout.activity_about);
27 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
28 | setAppNameAndVersion();
29 |
30 | mTextViewAboutInformation = findViewById(R.id.textview_about_information);
31 | mTextViewAboutInformation.setMovementMethod(LinkMovementMethod.getInstance());
32 |
33 | ImageView btnBuymeacoffee = findViewById(R.id.btn_buymeacoffee);
34 | ImageView btnAlipay = findViewById(R.id.btn_alipay);
35 |
36 | btnBuymeacoffee.setOnClickListener(
37 | new View.OnClickListener() {
38 | @Override
39 | public void onClick(View v) {
40 | String url = "https://www.buymeacoffee.com/w05dHCN";
41 | Intent i = new Intent(Intent.ACTION_VIEW);
42 | i.setData(Uri.parse(url));
43 | startActivity(i);
44 | }
45 | }
46 | );
47 |
48 | btnAlipay.setOnClickListener(
49 | new View.OnClickListener() {
50 | @Override
51 | public void onClick(View v) {
52 | Intent intent = new Intent();
53 | intent.setAction("android.intent.action.VIEW");
54 | //intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
55 | String payUrl = "HTTPS://QR.ALIPAY.COM/FKX011406PTCIHXZJPW7A1";
56 | //String payUrl = "HTTPS://QR.ALIPAY.COM/A6X00376AFOZWZUHWTDNDF4"; //any
57 | intent.setData(Uri.parse("alipayqr://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=" + payUrl));
58 | if (intent.resolveActivity(getPackageManager()) != null) {
59 | startActivity(intent);
60 | } else {
61 | intent.setData(Uri.parse(payUrl.toLowerCase()));
62 | startActivity(intent);
63 | }
64 | }
65 | }
66 | );
67 | }
68 |
69 | private TextView mAppNameAndVersion;
70 | private void setAppNameAndVersion(){
71 | if(mAppNameAndVersion == null){
72 | mAppNameAndVersion = findViewById(R.id.textview_app_name_and_version);
73 | }
74 | mAppNameAndVersion.setText(
75 | getText(R.string.app_name) + " ver: " + BuildConfig.VERSION_NAME);
76 | }
77 |
78 | @Override
79 | public boolean onOptionsItemSelected(MenuItem item) {
80 | switch (item.getItemId()) {
81 | // Respond to the action bar's Up/Home button
82 | case android.R.id.home:
83 | NavUtils.navigateUpFromSameTask(this);
84 | return true;
85 | }
86 | return super.onOptionsItemSelected(item);
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mmjang/ankillusion/utils/BuglyFileProvider.java:
--------------------------------------------------------------------------------
1 | package com.mmjang.ankillusion.utils;
2 |
3 | import android.support.v4.content.FileProvider;
4 |
5 | public class BuglyFileProvider extends FileProvider {
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/mmjang/ankillusion/utils/Utils.java:
--------------------------------------------------------------------------------
1 | package com.mmjang.ankillusion.utils;
2 |
3 | import android.content.Context;
4 | import android.content.DialogInterface;
5 | import android.content.pm.PackageManager;
6 | import android.support.v4.app.ActivityCompat;
7 | import android.support.v7.app.AlertDialog;
8 |
9 | public class Utils {
10 | public static boolean hasPermissions(Context context, String... permissions) {
11 | if (context != null && permissions != null) {
12 | for (String permission : permissions) {
13 | if (ActivityCompat.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) {
14 | return false;
15 | }
16 | }
17 | }
18 | return true;
19 | }
20 |
21 | public static void showMessage(Context context, String message){
22 | new AlertDialog.Builder(context)
23 | .setMessage(message)
24 | .setIcon(android.R.drawable.ic_dialog_alert)
25 | .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
26 | public void onClick(DialogInterface dialog, int whichButton) {
27 | return;
28 | }
29 | }).show();
30 | }
31 |
32 | public static String color2Hex(int color){
33 | String strColor = String.format("#%06X", 0xFFFFFF & color);
34 | return strColor;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/alipay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/drawable/alipay.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_chip_state_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/buymeacoffee.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/drawable/buymeacoffee.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/crop_button_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_camera_alt_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_close_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_crop_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_delete_forever_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_done_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_help_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_photo_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_rotate_right_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_settings_20px.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_text_fields_24px.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/drawable/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/launcher_button_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/launcher_button_pressed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/launcher_button_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
18 |
26 |
33 |
34 |
46 |
47 |
56 |
57 |
68 |
69 |
76 |
77 |
89 |
90 |
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
18 |
23 |
28 |
29 |
35 |
40 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
20 |
21 |
22 |
23 |
34 |
35 |
41 |
52 |
63 |
75 |
76 |
77 |
78 |
88 |
89 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
18 |
27 |
33 |
34 |
35 |
36 |
41 |
50 |
55 |
56 |
57 |
58 |
63 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_add_note.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
19 |
20 |
21 |
26 |
27 |
33 |
34 |
35 |
40 |
41 |
46 |
47 |
52 |
53 |
58 |
59 |
64 |
65 |
73 |
74 |
79 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/tag_chip_item.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/about_activity_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/image_activity_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values-zh/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - 全遮全显
5 | - 单遮单显
6 | - 全遮单显
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Anki 涂鸦制卡
4 |
5 | 本应用未获得存储读写权限,无法正常工作.\n
6 | 请在应用权限管理手动授予权限.
7 |
8 |
9 |
10 | 无法访问 Ankidroid API. 请确保:
11 | 已安装 Ankidroid; \n
12 | Ankidroid 高级设置中的“启用 Ankidroid API”已勾选; \n
13 | 在应用权限管理中授予本应用“读写 Ankidroid 数据库”权限; \n
14 |
15 | 牌组
16 | 制卡模式
17 | 正面笔记
18 | 反面笔记
19 | 删除所选遮挡区域
20 | 制卡
21 | 读取牌组列表时出错,请尝试先打开 Ankidroid:\n
22 | 未找到名为(%s)的牌组
23 | 添加模板时出错,请尝试先打开 Ankidroid: \n
24 | 向 Ankidroid 写入图片时出错: \n
25 | 生成 json 数据时出错: \n
26 | 写入卡片时出错: \n
27 | 请先选定要删除的区域!
28 | 制卡成功
29 | 输出卡片到 Ankidroid
30 | 请先使用底部按钮裁剪图片!
31 | 矩形区域颜色
32 | 矩形区域高亮颜色
33 | 确定
34 | 取消
35 | 设置
36 | https://github.com/mmjang/Ankillusion/blob/master/documentation-cn.md
37 | 关于
38 |
39 | 作者: mmjang \n
40 | 源码: Github Repo \n
41 | Email: pheiztu@foxmail.com\n
42 | 微信: Cc966200\n\n
43 | 致谢\n
44 | 1993hzw Doodle \n
45 | duanhong169 ColorPicker
46 |
47 | 打赏
48 | 支付宝打赏按钮:
49 | 国际用户打赏按钮:
50 | 制卡成功后退出应用
51 | 标签(以空格分隔)
52 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - Hide All - Reveal All
5 | - Hide One - Reveal One
6 | - Hide All - Reveal One
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #78909c
4 | #4b636e
5 | #a7c0cd
6 | #80a7c0cd
7 | #e65100
8 | #ac0800
9 | #ff7d47
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Anki Doodle
3 |
4 | You have denied this app\'s access to external storage, so we cannot make occlusion cards for you.\n
5 | Please grant this permission manually at application settings page.\n
6 |
7 |
8 |
9 | No access to ankidroid\'s API. You have to ensure that:\n
10 | You have Ankidroid installed.\n
11 | In the advanced settings of Ankidroid, You have \"Enable Ankidroid API\" checked.\n
12 | You have grant the permission "Read And Write Ankidroid Database" in this app\' settings page.
13 |
14 | Deck
15 | Mode
16 | Note of Front Side
17 | Note of Back Side
18 | delete selected occlusion
19 | create card(s)
20 | Error when read deck list, you may have to open Ankidroid first:
21 | No deck named %s found!
22 | Error When add model, you may have to open Ankidroid first:
23 | Error when write image file:
24 | Error generating json data:
25 | Error write cards, you may have to open Ankidroid first:
26 | No selected occlusion to delete!
27 | Card(s) added
28 | Add Card(s) to Ankidroid
29 | Illegal Operation; Crop the image first!
30 | Rectangle Color
31 | Rectangle Highlight Color
32 | Choose
33 | Cancel
34 | Settings
35 | https://github.com/mmjang/Ankillusion/blob/master/documentation-en.md
36 | About
37 |
38 | Author: mmjang \n
39 | Source Code: Github Repo \n
40 | Email: pheiztu@foxmail.com\n
41 | WeChat: Cc966200\n\n
42 | Acknowledgements\n
43 | 1993hzw\'s Doodle \n
44 | duanhong169\'s ColorPicker
45 |
46 | Donate
47 | For users in China:
48 | For international users:
49 | Exit after card(s) creation
50 | Tags(separated by blanks)
51 |
52 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/test/java/com/mmjang/ankillusion/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.mmjang.ankillusion;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.4.0'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | jcenter()
20 | google()
21 | maven { url 'https://jitpack.io' }
22 | maven { url "https://dl.bintray.com/mobisystech/maven" }
23 | mavenLocal()
24 |
25 | flatDir {
26 | dirs 'libs'
27 | }
28 | }
29 | }
30 |
31 | task clean(type: Delete) {
32 | delete rootProject.buildDir
33 | }
34 |
--------------------------------------------------------------------------------
/documentation-cn.md:
--------------------------------------------------------------------------------
1 | # Anki 涂鸦制卡
2 |
3 |
4 |
5 | ## 简介
6 |
7 | “Anki 涂鸦制卡”([下载地址](https://www.coolapk.com/apk/com.mmjang.ankillusion))可快速地在图片上进行知识点遮挡并制作记忆卡片。
8 |
9 | 图片遮挡流程:
10 |
11 | 
12 |
13 | 卡片复习:
14 |
15 | 
16 |
17 | “Anki 涂鸦制卡”需要配合记忆卡片软件 Ankidroid([下载地址](https://www.coolapk.com/apk/com.ichi2.anki
18 | ))使用。使用前需**确保**安装了 Ankidroid。
19 |
20 | ## 特性
21 |
22 | 图片可来自图库、相机、应用间分享;
23 |
24 | 可对图片进行翻转和裁剪这两种预处理流程;
25 |
26 | 遮挡矩形支持缩放、移动、旋转和删除操作;
27 |
28 | 支持3种制卡模式:
29 |
30 | 1. **全遮全显** 制作一张卡片,正面全部遮挡,反面全部显示;
31 |
32 | 
33 |
34 | 2. **单遮单显** 根据遮挡矩形区域数量制作多张卡片,每张卡片依次遮挡各个矩形;
35 |
36 | 
37 |
38 | 3. **全遮单显** 根据遮挡矩形区域数量制作多张卡片,每张卡片正面遮挡所有区域并依次高亮单个区域,背面仅显示高亮区域。
39 |
40 | 
41 |
42 | ## 常见问题
43 |
44 | ### 为啥卡片中的图片无法同步到 PC 端?
45 |
46 | 由于 Ankidroid 的某些实现细节,它并不会检查通过接口添加的卡片里的媒体链接,这会导致图片无法进入媒体数据库
47 | 并且无法被同步。
48 |
49 | 为了解决这个问题, 在同步之前先点击 Ankidroid 右上角菜单的“检查媒体”选项。这会让通过涂鸦添加的图片可
50 | 同步到其他客户端。
--------------------------------------------------------------------------------
/documentation-en.md:
--------------------------------------------------------------------------------
1 | # Anki Doodle
2 |
3 |
4 |
5 | ## Introduction
6 |
7 | **Anki Doodle**(([Download](https://github.com/mmjang/Ankillusion/releases/download/v1.1.0/Anki.Doodle.v1.1.0.apk))) helps you create image occlusion flashcards.
8 |
9 | Image occlusion:
10 |
11 | 
12 |
13 | Flashcards review:
14 |
15 | 
16 |
17 | This app must be used with Ankidroid([Download](https://play.google.com/store/apps/details?id=com.ichi2.anki)), the android version of flashcard software Anki. Before use **Anki Doodle**, please make sure you have Ankidroid installed.
18 |
19 | ## Features
20 |
21 | Can handle images from Gallery, Camera and Sharing from other apps;
22 |
23 | Support image rotation and cropping;
24 |
25 | Support moving, scaling, rotation and deletion of occlusion area;
26 |
27 | Support 3 card-creation modes:
28 |
29 | 1. **Hide All - Reveal All**;
30 |
31 | 
32 |
33 | 2. **Hide One - Reveal One**;
34 |
35 | 
36 |
37 | 3. **Hide All - Reveal One**:
38 |
39 | 
40 |
41 | ## Common Questions
42 |
43 | ### Why can't I sync the images to the desktop version of Anki?
44 |
45 | Due to some implementation details of Ankidroid, when adding cards via its api, it doesn't check for
46 | media file links in them, which makes the images files not included in the media database and
47 | can't be synced.
48 |
49 | To solve the problem, before syncing your decks, open the menu at the left right corner of
50 | Ankidroid and select "Check Media". This will make the image files added by Anki Doodle syncable.
51 |
--------------------------------------------------------------------------------
/etc/icons/baseline-camera_alt-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-close-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-crop-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-delete_forever-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-done-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-help-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-library_add-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-photo-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-rotate_right-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-settings-20px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/baseline-text_fields-24px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/etc/icons/ic_launcher - 副本.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/icons/ic_launcher - 副本.png
--------------------------------------------------------------------------------
/etc/icons/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/icons/ic_launcher.png
--------------------------------------------------------------------------------
/etc/pic/ankidoodle.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/ankidoodle.gif
--------------------------------------------------------------------------------
/etc/pic/ankidroid.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/ankidroid.gif
--------------------------------------------------------------------------------
/etc/pic/enframe_2019-04-24-19-51-45.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/enframe_2019-04-24-19-51-45.png
--------------------------------------------------------------------------------
/etc/pic/enframe_2019-04-24-19-58-18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/enframe_2019-04-24-19-58-18.png
--------------------------------------------------------------------------------
/etc/pic/enframe_2019-04-24-19-58-27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/enframe_2019-04-24-19-58-27.png
--------------------------------------------------------------------------------
/etc/pic/enframe_2019-04-24-19-58-42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/enframe_2019-04-24-19-58-42.png
--------------------------------------------------------------------------------
/etc/pic/enframe_2019-04-24-19-58-47.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/enframe_2019-04-24-19-58-47.png
--------------------------------------------------------------------------------
/etc/pic/google play icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/google play icon.png
--------------------------------------------------------------------------------
/etc/pic/google_play_big.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/google_play_big.png
--------------------------------------------------------------------------------
/etc/pic/mode_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/mode_1.png
--------------------------------------------------------------------------------
/etc/pic/mode_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/mode_2.png
--------------------------------------------------------------------------------
/etc/pic/mode_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/mode_3.png
--------------------------------------------------------------------------------
/etc/pic/poster.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/etc/pic/poster.psd
--------------------------------------------------------------------------------
/frontend/heart.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/frontend/heart.jpg
--------------------------------------------------------------------------------
/frontend/test_canvas - 副本.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Canvas tutorial
4 |
5 |
18 |
19 |
20 | {{Front}}
21 |
22 | {
23 | "version": 1,
24 | "image_file": "xxx.jpg",
25 | "width": 200,
26 | "height": 200,
27 | "shape_list_front":[
28 | {
29 | "type": "rect",
30 | "color": "#ff0000",
31 | "data":
32 | [[94, 593],
33 | [13, 683],
34 | [137, 794],
35 | [218, 704]]
36 | }
37 | ],
38 | "shape_list_back":[
39 | {
40 | "type": "rect",
41 | "color": "#00ff00",
42 | "data": [[94, 593],
43 | [13, 683],
44 | [137, 794],
45 | [218, 704]]
46 | }
47 | ]
48 | }
49 |
50 |
51 |
52 |
53 |
54 |
55 |
98 |
99 |
--------------------------------------------------------------------------------
/frontend/test_canvas.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Canvas tutorial
4 |
50 |
58 |
59 |
60 |
61 | {
62 | "version": 1,
63 | "image_file": "xxx.jpg",
64 | "width": 200,
65 | "height": 200,
66 | "shape_list_front":[
67 | {
68 | "type": "rect",
69 | "color": "#ff0000",
70 | "data":
71 | [[94, 593],
72 | [13, 683],
73 | [137, 794],
74 | [218, 704]]
75 | }
76 | ],
77 | "shape_list_back":[
78 | {
79 | "type": "rect",
80 | "color": "#00ff00",
81 | "data": [[94, 593],
82 | [13, 683],
83 | [137, 794],
84 | [218, 704]]
85 | }
86 | ]
87 | }
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | systemProp.http.proxyHost=127.0.0.1
15 | systemProp.http.proxyPort=1099
16 | systemProp.https.proxyHost=127.0.0.1
17 | systemProp.https.proxyPort=1099
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mmjang/Ankillusion/72c60e134557b1715bfe9f607f89f8fa4c8edde2/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Apr 28 16:13:31 CST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/privacy_policy.md:
--------------------------------------------------------------------------------
1 | ## Privacy Policy
2 |
3 | mmjang built the Anki Doodle app as an Open Source app. This SERVICE is provided by mmjang at no cost and is intended for use as is.
4 |
5 | This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
6 |
7 | If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
8 |
9 | The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Anki Doodle unless otherwise defined in this Privacy Policy.
10 |
11 | **Information Collection and Use**
12 |
13 | For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information, including but not limited to Device Name, Operation System, Crash Logs. The information that I request will be retained on your device and is not collected by me in any way.
14 |
15 | The app does use third party services that may collect information used to identify you.
16 |
17 | Link to privacy policy of third party service providers used by the app
18 |
19 | **Log Data**
20 |
21 | I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.
22 |
23 | **Cookies**
24 |
25 | Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.
26 |
27 | This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.
28 |
29 | **Service Providers**
30 |
31 | I may employ third-party companies and individuals due to the following reasons:
32 |
33 | * To facilitate our Service;
34 | * To provide the Service on our behalf;
35 | * To perform Service-related services; or
36 | * To assist us in analyzing how our Service is used.
37 |
38 | I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.
39 |
40 | **Security**
41 |
42 | I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.
43 |
44 | **Links to Other Sites**
45 |
46 | This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.
47 |
48 | **Children’s Privacy**
49 |
50 | These Services do not address anyone under the age of 13\. I do not knowingly collect personally identifiable information from children under 13\. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.
51 |
52 | **Changes to This Privacy Policy**
53 |
54 | I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.
55 |
56 | **Contact Us**
57 |
58 | If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at pheiztu@foxmail.com.
59 |
60 | This privacy policy page was created at [privacypolicytemplate.net](https://privacypolicytemplate.net) and modified/generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.firebaseapp.com/)
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':Doodle:doodle'
2 | include ":Doodle:app"
3 | //project(':libdoodle').projectDir = new File(settingsDir, '/Doodle/doodle/')
4 | include ':app'
5 |
--------------------------------------------------------------------------------