)
93 | LANDSCAPE_FLOW_LAYOUT_PATTERN[i - (LANDSCAPE_FLOW_LAYOUT_PATTERN.length * mFlowLayoutPositionMultiplier)];
94 |
95 | return pair;
96 | }
97 | });
98 | break;
99 | }
100 | }
101 |
102 | return layoutManager;
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/app/src/main/res/animator-v21/appbar_always_elevated.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_arrow_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_arrow_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_content_redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_content_redo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_content_redo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_content_redo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_content_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_content_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_content_undo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_content_undo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_format_paint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_format_paint.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_more_vert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_more_vert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_palette.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_photo_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_photo_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_action_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_action_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_content_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_content_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_content_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_content_clear.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_content_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_content_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_editor_mode_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_editor_mode_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_image_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_image_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_image_color_lens.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_image_color_lens.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_mood_bad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-hdpi/ic_mood_bad.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_arrow_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_arrow_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_content_redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_content_redo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_content_redo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_content_redo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_content_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_content_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_content_undo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_content_undo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_format_paint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_format_paint.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_more_vert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_more_vert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_palette.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_photo_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_photo_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_action_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_action_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_content_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_content_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_content_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_content_clear.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_content_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_content_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_editor_mode_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_editor_mode_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_image_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_image_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_image_color_lens.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_image_color_lens.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_mood_bad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-mdpi/ic_mood_bad.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_arrow_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_arrow_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_content_redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_content_redo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_content_redo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_content_redo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_content_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_content_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_content_undo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_content_undo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_format_paint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_format_paint.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_more_vert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_more_vert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_palette.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_photo_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_photo_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_action_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_content_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_content_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_content_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_content_clear.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_content_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_content_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_editor_mode_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_editor_mode_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_image_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_image_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_image_color_lens.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_image_color_lens.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_mood_bad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xhdpi/ic_mood_bad.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_arrow_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_arrow_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_content_redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_content_redo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_content_redo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_content_redo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_content_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_content_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_content_undo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_content_undo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_format_paint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_format_paint.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_more_vert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_more_vert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_palette.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_photo_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_photo_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_action_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_content_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_content_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_content_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_content_clear.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_content_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_content_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_editor_mode_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_editor_mode_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_image_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_image_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_image_color_lens.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_image_color_lens.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_mood_bad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxhdpi/ic_mood_bad.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_arrow_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_arrow_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_content_redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_content_redo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_content_redo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_content_redo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_content_undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_content_undo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_content_undo_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_content_undo_disabled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_format_paint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_format_paint.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_more_vert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_more_vert.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_palette.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_palette.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_photo_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_photo_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_action_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_action_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_content_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_content_add.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_content_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_content_clear.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_content_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_content_save.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_editor_mode_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_editor_mode_edit.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_image.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_image_brush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_image_brush.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_image_color_lens.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_image_color_lens.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_mood_bad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable-xxxhdpi/ic_mood_bad.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/drawable_transparent_dialog_pattern.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable/logo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/transparent_dialog_pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/drawable/transparent_dialog_pattern.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
15 |
21 |
22 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
257 |
258 |
272 |
273 |
274 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
17 |
18 |
40 |
41 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
33 |
34 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_draw_attribs.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
17 |
18 |
23 |
24 |
32 |
33 |
40 |
41 |
50 |
51 |
52 |
57 |
58 |
66 |
67 |
74 |
75 |
84 |
85 |
86 |
91 |
92 |
100 |
101 |
108 |
109 |
118 |
119 |
120 |
128 |
129 |
137 |
138 |
146 |
147 |
155 |
156 |
164 |
165 |
173 |
174 |
179 |
180 |
188 |
189 |
197 |
198 |
199 |
206 |
207 |
212 |
213 |
221 |
222 |
230 |
231 |
239 |
240 |
241 |
248 |
249 |
254 |
255 |
263 |
264 |
272 |
273 |
281 |
282 |
283 |
290 |
291 |
296 |
297 |
306 |
307 |
316 |
317 |
326 |
327 |
336 |
337 |
338 |
339 |
340 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_request_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_save_bitmap.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
21 |
22 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/layout_select_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
16 |
17 |
18 |
19 |
26 |
27 |
32 |
33 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
10 |
16 |
17 | -
22 |
23 |
28 |
33 |
34 |
35 |
36 |
37 | -
42 |
43 |
47 |
51 |
55 |
59 |
63 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-sw600dp/layouts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #00695C
4 | #004D40
5 | #0091EA
6 |
7 | #FFF
8 |
9 | #AFFF
10 | #A000
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/layouts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | DrawView Library
3 |
4 | Stroke width: %1$d
5 | Opacity: %1$d
6 | Font size: %1$d
7 |
8 | Undo
9 | Redo
10 | Functions
11 | Draw attributes
12 | Background image
13 | Draw tool
14 | Draw mode
15 | Save draw
16 | Camera option
17 | DrawView option
18 |
19 |
20 | ca-app-pub-6238951090454835/7400289908
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/test/java/com/byox/drawviewproject/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawviewproject;
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() throws Exception {
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 | repositories {
5 | jcenter()
6 | maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:2.3.1'
10 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
11 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | classpath 'com.google.gms:google-services:3.0.0'
16 | }
17 | }
18 |
19 | allprojects {
20 | repositories {
21 | jcenter()
22 | maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/destacada.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/destacada.png
--------------------------------------------------------------------------------
/device-2016-11-19-113458.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/device-2016-11-19-113458.png
--------------------------------------------------------------------------------
/drawview/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/drawview/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | ext {
4 | bintrayRepo = 'maven'
5 | bintrayName = 'DrawView'
6 |
7 | publishedGroupId = 'com.byox.drawview'
8 | libraryName = 'DrawView'
9 | artifact = 'drawview'
10 |
11 | libraryDescription = 'Android view that allows the user to create drawings. Customize settings like color, width or tools. Undo or redo actions.'
12 |
13 | siteUrl = 'https://github.com/ByoxCode/DrawView'
14 | gitUrl = 'https://github.com/ByoxCode/DrawView.git'
15 |
16 | libraryVersion = '1.3.1'
17 |
18 | developerId = 'byox'
19 | developerName = 'Oscar Medina'
20 | developerEmail = 'ing.medinacruz@gmail.com'
21 |
22 | licenseName = 'The Apache Software License, Version 2.0'
23 | licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
24 | allLicenses = ["Apache-2.0"]
25 | }
26 |
27 | android {
28 | compileSdkVersion 25
29 | buildToolsVersion '25.0.2'
30 |
31 | defaultConfig {
32 | minSdkVersion 14
33 | targetSdkVersion 25
34 | versionCode 14
35 | versionName "1.3.1"
36 |
37 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
38 |
39 | }
40 | buildTypes {
41 | release {
42 | minifyEnabled false
43 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
44 | }
45 | }
46 | }
47 |
48 | dependencies {
49 | compile fileTree(dir: 'libs', include: ['*.jar'])
50 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
51 | exclude group: 'com.android.support', module: 'support-annotations'
52 | })
53 | compile 'com.android.support:appcompat-v7:25.3.1'
54 | compile 'com.android.support:cardview-v7:25.3.1'
55 | testCompile 'junit:junit:4.12'
56 | }
57 |
58 | apply from: 'https://raw.githubusercontent.com/attwellBrian/JCenter/master/installv1.gradle'
59 | apply from: 'https://raw.githubusercontent.com/attwellBrian/JCenter/master/bintrayv1.gradle'
60 |
--------------------------------------------------------------------------------
/drawview/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\ADT\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/drawview/src/androidTest/java/com/byox/drawview/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.byox.drawview.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/drawview/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/dictionaries/DrawMove.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.dictionaries;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.Matrix;
5 | import android.graphics.Paint;
6 | import android.graphics.Path;
7 |
8 | import com.byox.drawview.enums.BackgroundScale;
9 | import com.byox.drawview.enums.BackgroundType;
10 | import com.byox.drawview.enums.DrawingMode;
11 | import com.byox.drawview.enums.DrawingTool;
12 | import com.byox.drawview.utils.SerializablePaint;
13 | import com.byox.drawview.utils.SerializablePath;
14 |
15 | import java.io.File;
16 | import java.io.Serializable;
17 | import java.util.List;
18 |
19 | /**
20 | * Created by Ing. Oscar G. Medina Cruz on 07/11/2016.
21 | *
22 | * Dictionary class that save move for draw in the view, this allow the user to make a history
23 | * of the user movements in the view and make a redo/undo.
24 | *
25 | * @author Ing. Oscar G. Medina Cruz
26 | */
27 |
28 | public class DrawMove implements Serializable {
29 |
30 | private static DrawMove mSingleton;
31 |
32 | private SerializablePaint mPaint;
33 | private DrawingMode mDrawingMode = null;
34 | private DrawingTool mDrawingTool = null;
35 | //private List mDrawingPathList;
36 | private SerializablePath mDrawingPath;
37 | private float mStartX, mStartY, mEndX, mEndY;
38 | private String mText;
39 | private Matrix mBackgroundMatrix;
40 | private byte[] mBackgroundImage;
41 |
42 | // METHODS
43 | private DrawMove() {
44 | }
45 |
46 | public static DrawMove newInstance() {
47 | mSingleton = new DrawMove();
48 | return mSingleton;
49 | }
50 |
51 | // GETTERS
52 |
53 | public SerializablePaint getPaint() {
54 | return mPaint;
55 | }
56 |
57 | public DrawingMode getDrawingMode() {
58 | return mDrawingMode;
59 | }
60 |
61 | public DrawingTool getDrawingTool() {
62 | return mDrawingTool;
63 | }
64 |
65 | public SerializablePath getDrawingPath() {
66 | return mDrawingPath;
67 | }
68 |
69 | public float getStartX() {
70 | return mStartX;
71 | }
72 |
73 | public float getStartY() {
74 | return mStartY;
75 | }
76 |
77 | public float getEndX() {
78 | return mEndX;
79 | }
80 |
81 | public float getEndY() {
82 | return mEndY;
83 | }
84 |
85 | public String getText() {
86 | return mText;
87 | }
88 |
89 | public Matrix getBackgroundMatrix(){
90 | return mBackgroundMatrix;
91 | }
92 |
93 | public byte[] getBackgroundImage() {
94 | return mBackgroundImage;
95 | }
96 |
97 | // SETTERS
98 |
99 | public DrawMove setPaint(SerializablePaint paint) {
100 | if (mSingleton != null) {
101 | mSingleton.mPaint = paint;
102 | return mSingleton;
103 | } else throw new RuntimeException("Create new instance of DrawMove first!");
104 | }
105 |
106 | public DrawMove setDrawingMode(DrawingMode drawingMode) {
107 | if (mSingleton != null) {
108 | mSingleton.mDrawingMode = drawingMode;
109 | return mSingleton;
110 | } else throw new RuntimeException("Create new instance of DrawMove first!");
111 | }
112 |
113 | public DrawMove setDrawingTool(DrawingTool drawingTool) {
114 | if (mSingleton != null) {
115 | mSingleton.mDrawingTool = drawingTool;
116 | return mSingleton;
117 | } else throw new RuntimeException("Create new instance of DrawMove first!");
118 | }
119 |
120 | public DrawMove setDrawingPathList(SerializablePath drawingPath) {
121 | if (mSingleton != null) {
122 | mSingleton.mDrawingPath = drawingPath;
123 | return mSingleton;
124 | } else throw new RuntimeException("Create new instance of DrawMove first!");
125 | }
126 |
127 | public DrawMove setStartX(float startX) {
128 | if (mSingleton != null) {
129 | mSingleton.mStartX = startX;
130 | return mSingleton;
131 | } else throw new RuntimeException("Create new instance of DrawMove first!");
132 | }
133 |
134 | public DrawMove setStartY(float startY) {
135 | if (mSingleton != null) {
136 | mSingleton.mStartY = startY;
137 | return mSingleton;
138 | } else throw new RuntimeException("Create new instance of DrawMove first!");
139 | }
140 |
141 | public DrawMove setEndX(float endX) {
142 | if (mSingleton != null) {
143 | mSingleton.mEndX = endX;
144 | return mSingleton;
145 | } else throw new RuntimeException("Create new instance of DrawMove first!");
146 | }
147 |
148 | public DrawMove setEndY(float endY) {
149 | if (mSingleton != null) {
150 | mSingleton.mEndY = endY;
151 | return mSingleton;
152 | } else throw new RuntimeException("Create new instance of DrawMove first!");
153 | }
154 |
155 | public DrawMove setText(String text) {
156 | if (mSingleton != null) {
157 | mSingleton.mText = text;
158 | return mSingleton;
159 | } else throw new RuntimeException("Create new instance of DrawMove first!");
160 | }
161 |
162 | public DrawMove setBackgroundImage(byte[] backgroundImage, Matrix backgroundMatrix) {
163 | if (mSingleton != null) {
164 | mSingleton.mBackgroundImage = backgroundImage;
165 | mSingleton.mBackgroundMatrix = backgroundMatrix;
166 | return mSingleton;
167 | } else throw new RuntimeException("Create new instance of DrawMove first!");
168 | }
169 | }
170 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/enums/BackgroundScale.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.enums;
2 |
3 | /**
4 | * Created by IngMedina on 29/04/2017.
5 | */
6 |
7 | public enum BackgroundScale {
8 | CENTER_INSIDE,
9 | CENTER_CROP,
10 | FIT_XY,
11 | FIT_START,
12 | FIT_END
13 | }
14 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/enums/BackgroundType.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.enums;
2 |
3 | /**
4 | * Created by IngMedina on 29/04/2017.
5 | */
6 |
7 | public enum BackgroundType {
8 | FILE,
9 | BITMAP,
10 | BYTES
11 | }
12 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/enums/DrawingCapture.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.enums;
2 |
3 | /**
4 | * Created by Ing. Oscar G. Medina Cruz on 09/11/2016.
5 | */
6 |
7 | public enum DrawingCapture {
8 | BITMAP,
9 | BYTES
10 | }
11 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/enums/DrawingMode.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.enums;
2 |
3 | /**
4 | * Created by Ing. Oscar G. Medina Cruz on 06/11/2016.
5 | */
6 |
7 | public enum DrawingMode {
8 | DRAW,
9 | TEXT,
10 | ERASER
11 | }
12 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/enums/DrawingOrientation.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.enums;
2 |
3 | /**
4 | * Created by IngMedina on 28/04/2017.
5 | */
6 |
7 | public enum DrawingOrientation {
8 | PORTRAIT, LANDSCAPE
9 | }
10 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/enums/DrawingTool.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.enums;
2 |
3 | /**
4 | * Created by Ing. Oscar G. Medina Cruz on 06/11/2016.
5 | */
6 |
7 | public enum DrawingTool {
8 | PEN,
9 | LINE,
10 | ARROW,
11 | RECTANGLE,
12 | CIRCLE,
13 | ELLIPSE
14 | }
15 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/utils/BitmapUtils.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.graphics.Canvas;
7 | import android.graphics.Matrix;
8 | import android.graphics.Paint;
9 | import android.graphics.Point;
10 | import android.graphics.RectF;
11 | import android.media.ExifInterface;
12 | import android.util.Log;
13 | import android.util.Size;
14 | import android.view.View;
15 |
16 | import com.byox.drawview.enums.BackgroundScale;
17 | import com.byox.drawview.enums.BackgroundType;
18 | import com.byox.drawview.views.DrawView;
19 |
20 | import java.io.ByteArrayOutputStream;
21 | import java.io.File;
22 | import java.io.FileNotFoundException;
23 | import java.io.FileOutputStream;
24 | import java.io.IOException;
25 |
26 | /**
27 | * Created by IngMedina on 28/03/2017.
28 | */
29 |
30 | public class BitmapUtils {
31 | public static Bitmap CreateBitmapMatchesViewSize(View imageViewDest, Bitmap bitmapSrc) {
32 | int currentBitmapWidth = bitmapSrc.getWidth();
33 | int currentBitmapHeight = bitmapSrc.getHeight();
34 |
35 | int ivWidth = imageViewDest.getWidth();
36 | int ivHeight = imageViewDest.getHeight();
37 | int newWidth = ivWidth;
38 | int newHeight = (int) Math.floor((double) currentBitmapHeight * ((double) newWidth / (double) currentBitmapWidth));
39 |
40 | return Bitmap.createScaledBitmap(bitmapSrc, newWidth, newHeight, true);
41 | }
42 |
43 | public static byte[] GetCompressedImage(Object image, BackgroundType backgroundType, int compressQuality) {
44 |
45 | Bitmap bmp = null;
46 | Bitmap scaledBitmap = null;
47 | BitmapFactory.Options options = new BitmapFactory.Options();
48 |
49 | // by setting this field as true, the actual bitmap pixels are not loaded in the memory. Just the bounds are loaded. If
50 | // you try the use the bitmap here, you will get null.
51 | options.inJustDecodeBounds = true;
52 | switch (backgroundType) {
53 | case FILE:
54 | bmp = BitmapFactory.decodeFile(((File) image).getAbsolutePath(), options);
55 | break;
56 | case BITMAP:
57 | bmp = (Bitmap) image;
58 | options.outHeight = bmp.getHeight();
59 | options.outWidth = bmp.getWidth();
60 | break;
61 | case BYTES:
62 | bmp = BitmapFactory.decodeByteArray((byte[]) image, 0, ((byte[]) image).length, options);
63 | break;
64 | }
65 |
66 | int actualHeight = options.outHeight;
67 | int actualWidth = options.outWidth;
68 |
69 | // max Height and width values of the compressed image is taken as 816x612
70 |
71 | float maxHeight = 816.0f;
72 | float maxWidth = 612.0f;
73 | float imgRatio = actualWidth / actualHeight;
74 | float maxRatio = maxWidth / maxHeight;
75 |
76 | // width and height values are set maintaining the aspect ratio of the image
77 |
78 | if (actualHeight > maxHeight || actualWidth > maxWidth) {
79 | if (imgRatio < maxRatio) {
80 | imgRatio = maxHeight / actualHeight;
81 | actualWidth = (int) (imgRatio * actualWidth);
82 | actualHeight = (int) maxHeight;
83 | } else if (imgRatio > maxRatio) {
84 | imgRatio = maxWidth / actualWidth;
85 | actualHeight = (int) (imgRatio * actualHeight);
86 | actualWidth = (int) maxWidth;
87 | } else {
88 | actualHeight = (int) maxHeight;
89 | actualWidth = (int) maxWidth;
90 |
91 | }
92 | }
93 |
94 | // setting inSampleSize value allows to load a scaled down version of the original image
95 |
96 | options.inSampleSize = CalculateInSampleSize(options, actualWidth, actualHeight);
97 |
98 | // inJustDecodeBounds set to false to load the actual bitmap
99 | options.inJustDecodeBounds = false;
100 |
101 | // this options allow android to claim the bitmap memory if it runs low on memory
102 | options.inPurgeable = true;
103 | options.inInputShareable = true;
104 | options.inTempStorage = new byte[16 * 1024];
105 |
106 | switch (backgroundType) {
107 | case FILE:
108 | bmp = BitmapFactory.decodeFile(((File) image).getAbsolutePath(), options);
109 | break;
110 | case BITMAP:
111 | bmp = (Bitmap) image;
112 | break;
113 | case BYTES:
114 | bmp = BitmapFactory.decodeByteArray((byte[]) image, 0, ((byte[]) image).length);
115 | break;
116 | }
117 | /*try {
118 | // load the bitmap from its path
119 | bmp = BitmapFactory.decodeFile(image.getAbsolutePath(), options);
120 | } catch (OutOfMemoryError exception) {
121 | exception.printStackTrace();
122 |
123 | }*/
124 | try {
125 | scaledBitmap = Bitmap.createBitmap(actualWidth, actualHeight, Bitmap.Config.ARGB_8888);
126 | } catch (OutOfMemoryError exception) {
127 | exception.printStackTrace();
128 | }
129 |
130 | float ratioX = actualWidth / (float) options.outWidth;
131 | float ratioY = actualHeight / (float) options.outHeight;
132 | float middleX = actualWidth / 2.0f;
133 | float middleY = actualHeight / 2.0f;
134 |
135 | Matrix scaleMatrix = new Matrix();
136 | scaleMatrix.setScale(ratioX, ratioY, middleX, middleY);
137 |
138 | Canvas canvas = new Canvas(scaledBitmap);
139 | canvas.setMatrix(scaleMatrix);
140 | canvas.drawBitmap(bmp, middleX - bmp.getWidth() / 2, middleY - bmp.getHeight() / 2, new Paint(Paint.FILTER_BITMAP_FLAG));
141 |
142 | // check the rotation of the image and display it properly
143 | ExifInterface exif;
144 | try {
145 | Matrix matrix = new Matrix();
146 | if (backgroundType == BackgroundType.FILE) {
147 | exif = new ExifInterface(((File) image).getAbsolutePath());
148 |
149 | int orientation = exif.getAttributeInt(
150 | ExifInterface.TAG_ORIENTATION, 0);
151 | Log.d("EXIF", "Exif: " + orientation);
152 | if (orientation == 6) {
153 | matrix.postRotate(90);
154 | Log.d("EXIF", "Exif: " + orientation);
155 | } else if (orientation == 3) {
156 | matrix.postRotate(180);
157 | Log.d("EXIF", "Exif: " + orientation);
158 | } else if (orientation == 8) {
159 | matrix.postRotate(270);
160 | Log.d("EXIF", "Exif: " + orientation);
161 | }
162 | }
163 |
164 | scaledBitmap = Bitmap.createBitmap(scaledBitmap, 0, 0,
165 | scaledBitmap.getWidth(), scaledBitmap.getHeight(), matrix,
166 | true);
167 | } catch (IOException e) {
168 | e.printStackTrace();
169 | }
170 |
171 | // try {
172 | // returnFile = File.createTempFile("temp", "." + (
173 | // image.getAbsolutePath().toLowerCase().endsWith("jpg") ? "jpg" : "png"));
174 | // FileOutputStream out = null;
175 | // String filename = returnFile.getAbsolutePath();
176 | ByteArrayOutputStream stream = null;
177 | // try {
178 | // out = new FileOutputStream(filename);
179 | stream = new ByteArrayOutputStream();
180 |
181 | // write the compressed bitmap at the destination specified by filename.
182 | scaledBitmap.compress(Bitmap.CompressFormat.PNG, compressQuality, stream);
183 | bmp.recycle();
184 |
185 | // } catch (FileNotFoundException e) {
186 | // e.printStackTrace();
187 | // }
188 | // } catch (IOException e) {
189 | // e.printStackTrace();
190 | // }
191 |
192 | return stream.toByteArray();
193 |
194 | }
195 |
196 | public static int CalculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {
197 | final int height = options.outHeight;
198 | final int width = options.outWidth;
199 | int inSampleSize = 1;
200 |
201 | if (height > reqHeight || width > reqWidth) {
202 | final int heightRatio = Math.round((float) height / (float) reqHeight);
203 | final int widthRatio = Math.round((float) width / (float) reqWidth);
204 | inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
205 | }
206 | final float totalPixels = width * height;
207 | final float totalReqPixelsCap = reqWidth * reqHeight * 2;
208 | while (totalPixels / (inSampleSize * inSampleSize) > totalReqPixelsCap) {
209 | inSampleSize++;
210 | }
211 |
212 | return inSampleSize;
213 | }
214 |
215 | public static Bitmap GetBitmapForDrawView(DrawView drawView, Object image, BackgroundType backgroundType, int imageQuality) {
216 | byte[] imageInBytes = BitmapUtils.GetCompressedImage(image, backgroundType, imageQuality);
217 | return BitmapUtils.CreateBitmapMatchesViewSize(drawView,
218 | BitmapFactory.decodeByteArray(imageInBytes, 0, imageInBytes.length));
219 | }
220 |
221 | public static Bitmap GetCombinedBitmaps(Bitmap bmp1, Bitmap bmp2, int destWidth, int destHeight) {
222 | Bitmap bmOverlay = Bitmap.createBitmap(destWidth, destHeight, bmp1.getConfig());
223 | Canvas canvas = new Canvas(bmOverlay);
224 | canvas.drawBitmap(bmp1, new Matrix(), null);
225 | canvas.drawBitmap(bmp2, 0, 0, null);
226 | return bmOverlay;
227 | }
228 | }
229 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/utils/MatrixUtils.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.utils;
2 |
3 | import android.graphics.Matrix;
4 | import android.graphics.RectF;
5 |
6 | /**
7 | * Created by IngMedina on 29/04/2017.
8 | */
9 |
10 | public class MatrixUtils {
11 | public static Matrix GetCenterCropMatrix(RectF srcSize, RectF destSize){
12 | Matrix matrix = new Matrix();
13 | float scale = Math.max(destSize.width() / srcSize.width(),
14 | destSize.height() / srcSize.height());
15 | matrix.setTranslate(-(destSize.width() / 2), - (destSize.height() / 2));
16 | matrix.setScale(scale, scale);
17 |
18 | return matrix;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/utils/SerializablePaint.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.utils;
2 |
3 | import android.graphics.Paint;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * Empty class that handles a parcelable Paint object
9 | * Created by IngMedina on 28/04/2017.
10 | */
11 |
12 | public class SerializablePaint extends Paint implements Serializable {
13 | }
14 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/utils/SerializablePath.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.utils;
2 |
3 | import android.graphics.Path;
4 |
5 | import java.io.Serializable;
6 |
7 | /**
8 | * Empty class that handles parcelable Path object
9 | * Created by IngMedina on 28/04/2017.
10 | */
11 |
12 | public class SerializablePath extends Path implements Serializable {
13 | }
14 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/utils/ViewUtils.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.utils;
2 |
3 | import java.util.concurrent.atomic.AtomicInteger;
4 |
5 | /**
6 | * Created by IngMedina on 30/04/2017.
7 | */
8 |
9 | public class ViewUtils {
10 |
11 | private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1);
12 |
13 | public static int GetRandomViewID(){
14 | for (;;) {
15 | final int result = sNextGeneratedId.get();
16 | // aapt-generated IDs have the high byte nonzero; clamp to the range under that.
17 | int newValue = result + 1;
18 | if (newValue > 0x00FFFFFF) newValue = 1; // Roll over to 1, not 0.
19 | if (sNextGeneratedId.compareAndSet(result, newValue)) {
20 | return result;
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/views/CameraView.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.views;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.res.Configuration;
6 | import android.graphics.Bitmap;
7 | import android.graphics.BitmapFactory;
8 | import android.graphics.Matrix;
9 | import android.graphics.Rect;
10 | import android.graphics.YuvImage;
11 | import android.hardware.Camera;
12 | import android.util.Log;
13 | import android.view.SurfaceHolder;
14 | import android.view.SurfaceView;
15 |
16 | import com.byox.drawview.enums.DrawingCapture;
17 |
18 | import java.io.ByteArrayOutputStream;
19 | import java.io.File;
20 | import java.io.FileOutputStream;
21 | import java.io.IOException;
22 | import java.util.List;
23 |
24 | /**
25 | * Created by IngMedina on 29/04/2017.
26 | */
27 |
28 | public class CameraView extends SurfaceView
29 | implements SurfaceHolder.Callback,
30 | Camera.PreviewCallback {
31 |
32 | public enum CAMERA_TYPE {
33 | FRONT_CAMERA,
34 | BACK_CAMERA
35 | }
36 |
37 | // CONSTANTS
38 | private final String TAG = "CameraView";
39 |
40 | private Context mContext;
41 | private Camera mCamera;
42 | private SurfaceHolder mCurrentSurface;
43 | private CAMERA_TYPE mCurrentCameraType;
44 | private boolean mFlash = false;
45 | private YuvImage mYuvImage;
46 | private byte[] byteArray;
47 |
48 | private List mCameraSizes;
49 | private Camera.Size mPreviewSize;
50 |
51 | private OnCameraViewListener mListener;
52 |
53 | public CameraView(Activity activity, Context context) {
54 | super(context);
55 | mContext = context;
56 | getHolder().addCallback(this);
57 | getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
58 |
59 |
60 | try {
61 | mListener = (OnCameraViewListener) activity;
62 | } catch (ClassCastException e) {
63 | e.printStackTrace();
64 | }
65 | }
66 |
67 | public CameraView(Context context) {
68 | super(context);
69 |
70 | mContext = context;
71 | getHolder().addCallback(this);
72 | getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
73 | }
74 |
75 | @Override
76 | public void surfaceCreated(SurfaceHolder holder) {
77 | Log.i("CAMERA_VIEW", "Creating camera");
78 | mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
79 | mCurrentCameraType = CAMERA_TYPE.BACK_CAMERA;
80 | }
81 |
82 | @Override
83 | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
84 | Log.i("CAMERA_VIEW", "Changing camera");
85 | // mCameraWidth = width;
86 | // mCameraHeight = height;
87 | mCurrentSurface = holder;
88 | initCamera();
89 | }
90 |
91 | @Override
92 | public void surfaceDestroyed(SurfaceHolder holder) {
93 | Log.i("CAMERA_VIEW", "Destroying camera");
94 | releaseCamera();
95 | }
96 |
97 | @Override
98 | public void onPreviewFrame(byte[] data, Camera camera) {
99 | try {
100 | Camera.Parameters p = camera.getParameters();
101 | int w = p.getPreviewSize().width;
102 | int h = p.getPreviewSize().height;
103 | int format = p.getPreviewFormat();
104 | mYuvImage = new YuvImage(data, format, w, h, null);
105 | byteArray = data;
106 | } catch (Exception e) {
107 | e.printStackTrace();
108 | }
109 | }
110 |
111 | private Camera.Size getOptimalPreviewSize(List sizes, int w, int h) {
112 | final double ASPECT_TOLERANCE = 0.1;
113 | double targetRatio = (double) w / h;
114 |
115 | if (sizes == null) return null;
116 |
117 | Camera.Size optimalSize = null;
118 |
119 | double minDiff = Double.MAX_VALUE;
120 |
121 | int targetHeight = h;
122 |
123 | // Find size
124 | for (Camera.Size size : sizes) {
125 | double ratio = (double) size.width / size.height;
126 | if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue;
127 | if (Math.abs(size.height - targetHeight) < minDiff) {
128 | optimalSize = size;
129 | minDiff = Math.abs(size.height - targetHeight);
130 | }
131 | }
132 |
133 | if (optimalSize == null) {
134 | minDiff = Double.MAX_VALUE;
135 | for (Camera.Size size : sizes) {
136 | if (Math.abs(size.height - targetHeight) < minDiff) {
137 | optimalSize = size;
138 | minDiff = Math.abs(size.height - targetHeight);
139 | }
140 | }
141 | }
142 | Log.i(TAG, "Optimal size: " + optimalSize.width + "x" + optimalSize.height);
143 | return optimalSize;
144 | }
145 |
146 | @Override
147 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
148 | final int width = resolveSize(getSuggestedMinimumWidth(), widthMeasureSpec);
149 | final int height = resolveSize(getSuggestedMinimumHeight(), heightMeasureSpec);
150 |
151 | if (mCameraSizes != null) {
152 | mPreviewSize = getOptimalPreviewSize(mCameraSizes, width, height);
153 | }
154 |
155 | if (mPreviewSize != null) {
156 | float ratio;
157 | if (mPreviewSize.height >= mPreviewSize.width) {
158 | ratio = (float) mPreviewSize.height / (float) mPreviewSize.width;
159 | setMeasuredDimension((int) (width * ratio), height);
160 | } else {
161 | ratio = (float) mPreviewSize.width / (float) mPreviewSize.height;
162 | setMeasuredDimension(width, (int) (height * ratio));
163 | }
164 | } else
165 | setMeasuredDimension(width, height);
166 | }
167 |
168 | /**
169 | * METODOS
170 | */
171 | private int getCameraNumber() {
172 | return Camera.getNumberOfCameras();
173 | }
174 |
175 | public void changeCamera(CAMERA_TYPE camera_type) {
176 |
177 | if (getCameraNumber() == 1)
178 | return;
179 |
180 | releaseCamera();
181 |
182 | mCurrentCameraType = camera_type;
183 |
184 | switch (camera_type) {
185 | case BACK_CAMERA:
186 | mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
187 | break;
188 | case FRONT_CAMERA:
189 | mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
190 | break;
191 | default:
192 | mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
193 | break;
194 | }
195 |
196 | initCamera();
197 | }
198 |
199 | public void releaseCamera() {
200 | try {
201 | mCamera.stopPreview();
202 | mCamera.setPreviewCallback(null);
203 | getHolder().removeCallback(this);
204 | mCamera.release();
205 | mCamera = null;
206 | } catch (Exception e) {
207 | e.printStackTrace();
208 | }
209 | }
210 |
211 | public void initCamera() {
212 | try {
213 | mCamera.stopPreview();
214 | } catch (Exception e) {
215 | e.printStackTrace();
216 | }
217 |
218 | if (mCamera == null) {
219 | switch (mCurrentCameraType) {
220 | case BACK_CAMERA:
221 | mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
222 | break;
223 | case FRONT_CAMERA:
224 | mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_FRONT);
225 | break;
226 | default:
227 | mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);
228 | break;
229 | }
230 | mCamera.setPreviewCallback(this);
231 | }
232 |
233 | Camera.Parameters p = mCamera.getParameters();
234 | mCameraSizes = p.getSupportedPreviewSizes();
235 |
236 | if (mPreviewSize == null)
237 | return;
238 |
239 | p.setPreviewSize(mPreviewSize.width, mPreviewSize.height);
240 | mCamera.setParameters(p);
241 |
242 | if (mContext.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
243 | p.set("orientation", "portrait");
244 | mCamera.setDisplayOrientation(90);
245 | } else {
246 | p.set("orientation", "landscape");
247 | mCamera.setDisplayOrientation(180);
248 | }
249 |
250 | try {
251 | mCamera.setPreviewCallback(this);
252 | mCamera.setPreviewDisplay(getHolder());
253 | mCamera.startPreview();
254 | } catch (IOException e) {
255 | e.printStackTrace();
256 | }
257 |
258 | mListener.onCameraShow();
259 | }
260 |
261 | private Camera.Size getBestPreviewSize(int width, int height,
262 | Camera.Parameters parameters) {
263 | Camera.Size result = null;
264 |
265 | for (Camera.Size size : parameters.getSupportedPreviewSizes()) {
266 | if (size.width <= width && size.height <= height) {
267 | if (result == null) {
268 | result = size;
269 | } else {
270 | int resultArea = result.width * result.height;
271 | int newArea = size.width * size.height;
272 |
273 | if (newArea > resultArea) {
274 | result = size;
275 | }
276 | }
277 | }
278 | }
279 |
280 | return (result);
281 | }
282 |
283 | public Camera getCurrentCamera() {
284 | return mCamera;
285 | }
286 |
287 | public CAMERA_TYPE getCurrentCameraType() {
288 | return mCurrentCameraType;
289 | }
290 |
291 | public void changeTorchStatus(boolean turnOption) {
292 |
293 | if (mCurrentCameraType == CAMERA_TYPE.FRONT_CAMERA)
294 | return;
295 |
296 | if (turnOption) {
297 | turnOffTorch();
298 | } else {
299 | turnOnTorch();
300 | }
301 | }
302 |
303 | public boolean getFlashStatus() {
304 | return mFlash;
305 | }
306 |
307 | private void turnOnTorch() {
308 | Camera.Parameters parameters = mCamera.getParameters();
309 | List flashModes = parameters.getSupportedFlashModes();
310 | String flashMode = parameters.getFlashMode();
311 | Log.i("turnOnTorch", "Flash mode: " + flashMode);
312 | Log.i("turnOnTorch", "Flash modes: " + flashModes);
313 | if (!Camera.Parameters.FLASH_MODE_TORCH.equals(flashMode)) {
314 | if (flashModes.contains(Camera.Parameters.FLASH_MODE_TORCH)) {
315 | parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);
316 | mCamera.setParameters(parameters);
317 | mFlash = true;
318 | } else {
319 | Log.e("turnOnTorch", "FLASH_MODE_TORCH not supported");
320 | }
321 | }
322 | }
323 |
324 | private void turnOffTorch() {
325 | Camera.Parameters parameters = mCamera.getParameters();
326 | List flashModes = parameters.getSupportedFlashModes();
327 | String flashMode = parameters.getFlashMode();
328 | Log.i("turnOffTorch", "Flash mode: " + flashMode);
329 | Log.i("turnOffTorch", "Flash modes: " + flashModes);
330 | if (!Camera.Parameters.FLASH_MODE_OFF.equals(flashMode)) {
331 | if (flashModes.contains(Camera.Parameters.FLASH_MODE_OFF)) {
332 | parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
333 | mCamera.setParameters(parameters);
334 | mFlash = false;
335 | } else {
336 | Log.e("turnOffTorch", "FLASH_MODE_OFF not supported");
337 | }
338 | }
339 | }
340 |
341 | public Object getCameraFrame(DrawingCapture drawingCapture) {
342 | Camera.Parameters p = mCamera.getParameters();
343 | ByteArrayOutputStream out = new ByteArrayOutputStream();
344 | Rect area = new Rect(0, 0, p.getPreviewSize().width, p.getPreviewSize().height);
345 | mYuvImage.compressToJpeg(area, 100, out);
346 |
347 | Matrix matrix = new Matrix();
348 | matrix.postRotate(90);
349 | Bitmap bitmap = BitmapFactory.decodeByteArray(out.toByteArray(), 0, out.toByteArray().length);
350 | bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
351 |
352 | if (drawingCapture == DrawingCapture.BITMAP)
353 | return bitmap;
354 | else
355 | return out.toByteArray();
356 | }
357 |
358 | /*public Object getCameraFrame(DrawingCapture drawingCapture) {
359 | Object capturedFrame = null;
360 | try {
361 | Camera.Parameters p = mCamera.getParameters();
362 | if (p == null)
363 | return null;
364 |
365 | int format = p.getPreviewFormat();
366 | YuvImage yuvImage = new YuvImage(byteArray, format, p.getPreviewSize().width, p.getPreviewSize().height, null);
367 | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
368 |
369 | Rect rect = new Rect(0, 0, p.getPreviewSize().width, p.getPreviewSize().height);
370 |
371 | yuvImage.compressToJpeg(rect, 75, byteArrayOutputStream);
372 | BitmapFactory.Options options = new BitmapFactory.Options();
373 | options.inPurgeable = true;
374 | options.inInputShareable = true;
375 |
376 | if (drawingCapture == DrawingCapture.BITMAP)
377 | capturedFrame = BitmapFactory.decodeByteArray(byteArrayOutputStream.toByteArray(), 0, byteArrayOutputStream.size(), options);
378 | else
379 | capturedFrame = byteArrayOutputStream.toByteArray();
380 |
381 | byteArrayOutputStream.flush();
382 | byteArrayOutputStream.close();
383 | } catch (IOException ioe) {
384 | ioe.printStackTrace();
385 | }
386 |
387 | return capturedFrame;
388 | }*/
389 |
390 | public void setOnCameraViewListener(OnCameraViewListener onCameraViewListener) {
391 | mListener = onCameraViewListener;
392 | }
393 |
394 | /**
395 | * INTERFACES
396 | */
397 | public interface OnCameraViewListener {
398 | void onCameraShow();
399 | }
400 | }
401 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/views/DrawCameraView.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.views;
2 |
3 | import android.annotation.TargetApi;
4 | import android.content.Context;
5 | import android.content.res.TypedArray;
6 | import android.graphics.Canvas;
7 | import android.graphics.Color;
8 | import android.graphics.Typeface;
9 | import android.graphics.drawable.ColorDrawable;
10 | import android.os.Build;
11 | import android.os.Bundle;
12 | import android.os.Parcelable;
13 | import android.support.annotation.AttrRes;
14 | import android.support.annotation.NonNull;
15 | import android.support.annotation.Nullable;
16 | import android.support.annotation.StyleRes;
17 | import android.util.AttributeSet;
18 | import android.widget.FrameLayout;
19 |
20 | import com.byox.drawview.R;
21 | import com.byox.drawview.enums.DrawingMode;
22 | import com.byox.drawview.enums.DrawingOrientation;
23 | import com.byox.drawview.enums.DrawingTool;
24 | import com.byox.drawview.utils.SerializablePaint;
25 | import com.byox.drawview.utils.ViewUtils;
26 |
27 | /**
28 | * Created by IngMedina on 29/04/2017.
29 | */
30 |
31 | public class DrawCameraView extends FrameLayout {
32 |
33 | private CameraView mCameraView;
34 |
35 | public DrawCameraView(@NonNull Context context) {
36 | super(context);
37 | initCameraView();
38 | }
39 |
40 | public DrawCameraView(@NonNull Context context, @Nullable AttributeSet attrs) {
41 | super(context, attrs);
42 | initCameraView();
43 | }
44 |
45 | public DrawCameraView(@NonNull Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr) {
46 | super(context, attrs, defStyleAttr);
47 | initCameraView();
48 | }
49 |
50 | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
51 | public DrawCameraView(@NonNull Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr, @StyleRes int defStyleRes) {
52 | super(context, attrs, defStyleAttr, defStyleRes);
53 | initCameraView();
54 | }
55 |
56 | @Override
57 | protected void onDetachedFromWindow() {
58 | if (mCameraView != null)
59 | mCameraView.releaseCamera();
60 |
61 | super.onDetachedFromWindow();
62 | }
63 |
64 | // METHODS
65 | private void initCameraView() {
66 | try {
67 | if (mCameraView == null) {
68 | mCameraView = new CameraView(getContext());
69 | mCameraView.setOnCameraViewListener(new CameraView.OnCameraViewListener() {
70 | @Override
71 | public void onCameraShow() {
72 |
73 | }
74 | });
75 | }
76 | } catch (Exception e) {
77 | e.printStackTrace();
78 | }
79 | }
80 |
81 | public void attachCameraView() {
82 | if (getChildCount() == 0)
83 | addView(mCameraView);
84 | }
85 |
86 | public CameraView getCameraView() {
87 | return mCameraView;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/drawview/src/main/java/com/byox/drawview/views/ZoomRegionView.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview.views;
2 |
3 | import android.annotation.TargetApi;
4 | import android.content.Context;
5 | import android.graphics.Bitmap;
6 | import android.graphics.Canvas;
7 | import android.graphics.Color;
8 | import android.graphics.Paint;
9 | import android.graphics.PorterDuff;
10 | import android.graphics.PorterDuffXfermode;
11 | import android.graphics.Rect;
12 | import android.graphics.RectF;
13 | import android.os.Build;
14 | import android.support.annotation.AttrRes;
15 | import android.support.annotation.NonNull;
16 | import android.support.annotation.Nullable;
17 | import android.support.annotation.StyleRes;
18 | import android.util.AttributeSet;
19 | import android.util.SizeF;
20 | import android.view.MotionEvent;
21 | import android.view.View;
22 | import android.widget.FrameLayout;
23 | import android.widget.ImageView;
24 |
25 | /**
26 | * Created by IngMedina on 30/03/2017.
27 | */
28 |
29 | public class ZoomRegionView extends android.support.v7.widget.AppCompatImageView implements View.OnTouchListener {
30 |
31 | // LISTENER
32 | private OnZoomRegionListener mOnZoomRegionListener;
33 |
34 | // VARS
35 | private Bitmap mParentContent;
36 | private Paint mZoomedRegionPaint;
37 |
38 | private Bitmap mZoomOverlay;
39 | private Canvas mCanvasOverlay;
40 |
41 | private Rect mZoomedRegion;
42 | private Rect mSourceRect;
43 | private Rect mDestRect;
44 |
45 | private Paint mClearPaint;
46 |
47 | private int mCurrentMotionEvent = -1;
48 | private boolean mMoveZoomArea = false;
49 |
50 | private float mStartTouchX, mStartTouchY;
51 |
52 | public ZoomRegionView(@NonNull Context context) {
53 | super(context);
54 |
55 | initZoomRegion();
56 | }
57 |
58 | public ZoomRegionView(@NonNull Context context, @Nullable AttributeSet attrs) {
59 | super(context, attrs);
60 | initZoomRegion();
61 | }
62 |
63 | public ZoomRegionView(@NonNull Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr) {
64 | super(context, attrs, defStyleAttr);
65 | initZoomRegion();
66 | }
67 |
68 | @Override
69 | protected void onDraw(Canvas canvas) {
70 | if (mZoomedRegion != null) {
71 | canvas.drawBitmap(mParentContent, mSourceRect, mDestRect, null);
72 | canvas.drawRect(mDestRect, mZoomedRegionPaint);
73 |
74 | mZoomOverlay.eraseColor(Color.TRANSPARENT);
75 | mCanvasOverlay.drawRect(mDestRect, mZoomedRegionPaint);
76 | mCanvasOverlay.drawRect(mZoomedRegion, mClearPaint);
77 |
78 | canvas.drawBitmap(mZoomOverlay, 0, 0, null);
79 | }
80 |
81 | super.onDraw(canvas);
82 | }
83 |
84 | @Override
85 | public boolean onTouch(View v, MotionEvent event) {
86 | float touchX = event.getX();
87 | float touchY = event.getY();
88 |
89 | switch (event.getActionMasked()){
90 | case MotionEvent.ACTION_DOWN:
91 | mCurrentMotionEvent = MotionEvent.ACTION_DOWN;
92 | mMoveZoomArea = false;
93 |
94 | if (touchX >= mZoomedRegion.left && touchX <= mZoomedRegion.right
95 | && touchY >= mZoomedRegion.top && touchY <= mZoomedRegion.bottom) {
96 | mMoveZoomArea = true;
97 | mStartTouchX = touchX;
98 | mStartTouchY = touchY;
99 | }
100 |
101 | break;
102 |
103 | case MotionEvent.ACTION_MOVE:
104 | if ((mCurrentMotionEvent == MotionEvent.ACTION_DOWN
105 | || mCurrentMotionEvent == MotionEvent.ACTION_MOVE) && mMoveZoomArea){
106 | mCurrentMotionEvent = MotionEvent.ACTION_MOVE;
107 | Rect preview = new Rect(
108 | mZoomedRegion.left + (int) (touchX - mStartTouchX),
109 | mZoomedRegion.top + (int) (touchY - mStartTouchY),
110 | mZoomedRegion.right + (int) ((touchX - mStartTouchX)),
111 | mZoomedRegion.bottom + (int) ((touchY - mStartTouchY)));
112 |
113 | if (preview.left >= 0 && preview.right <= getWidth()
114 | && preview.top >= 0 && preview.bottom <= getHeight()) {
115 | mZoomedRegion = preview;
116 | invalidate();
117 | }
118 |
119 | mStartTouchX = touchX;
120 | mStartTouchY = touchY;
121 |
122 | if (mOnZoomRegionListener != null)
123 | mOnZoomRegionListener.onZoomRegionMoved(mZoomedRegion);
124 | }
125 | break;
126 |
127 | case MotionEvent.ACTION_UP:
128 | mCurrentMotionEvent = MotionEvent.ACTION_UP;
129 | mMoveZoomArea = false;
130 | break;
131 | }
132 | return true;
133 | }
134 |
135 | // METHODS
136 | private void initZoomRegion() {
137 | mZoomedRegionPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
138 | mZoomedRegionPaint.setColor(Color.BLACK);
139 | mZoomedRegionPaint.setAlpha(60);
140 |
141 | mClearPaint = new Paint();
142 | mClearPaint.setColor(Color.WHITE);
143 | mClearPaint.setAlpha(255);
144 | mClearPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OUT));
145 |
146 | setOnTouchListener(this);
147 | }
148 |
149 | public void drawZoomRegion(Bitmap parentContent, Rect sourceRect, float scaleFactor) {
150 | this.mParentContent = parentContent;
151 | mZoomedRegion = new Rect((int) (sourceRect.left / scaleFactor), (int) (sourceRect.top / scaleFactor),
152 | (int) (sourceRect.right / scaleFactor), (int) (sourceRect.bottom / scaleFactor));
153 | mSourceRect = new Rect(0, 0, mParentContent.getWidth(), mParentContent.getHeight());
154 | mDestRect = new Rect(0, 0, getWidth(), getHeight());
155 |
156 | Bitmap init = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
157 | mZoomOverlay = init.copy(Bitmap.Config.ARGB_8888, true);
158 | init.recycle();
159 | mCanvasOverlay = new Canvas(mZoomOverlay);
160 |
161 | invalidate();
162 | }
163 |
164 | // GETTERS & SETTERS
165 | private void setZoomedRegionStrokeWidth(float strokeWidth) {
166 | this.mZoomedRegionPaint.setStrokeWidth(strokeWidth);
167 | }
168 |
169 | private void setZoomedRegionStrokeColor(int strokeColor){
170 | this.mZoomedRegionPaint.setColor(strokeColor);
171 | }
172 |
173 | public float getZoomedRegionStrokeWidth() {
174 | return this.mZoomedRegionPaint.getStrokeWidth();
175 | }
176 |
177 | public int getZoomedRegionStrokeColor(){
178 | return this.mZoomedRegionPaint.getColor();
179 | }
180 |
181 | // LISTENER
182 | public void setOnZoomRegionListener(OnZoomRegionListener onZoomRegionListener){
183 | mOnZoomRegionListener = onZoomRegionListener;
184 | }
185 |
186 | public interface OnZoomRegionListener{
187 | void onZoomRegionMoved(Rect newRect);
188 | }
189 | }
190 |
--------------------------------------------------------------------------------
/drawview/src/main/res/drawable/drawable_transparent_pattern.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/drawview/src/main/res/drawable/transparent_pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ByoxCode/DrawView/db51f11de75aa836c3a910d86e56d509bbc25778/drawview/src/main/res/drawable/transparent_pattern.png
--------------------------------------------------------------------------------
/drawview/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/drawview/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | DrawView
3 |
4 |
--------------------------------------------------------------------------------
/drawview/src/test/java/com/byox/drawview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.byox.drawview;
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() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Mar 28 06:29:52 CST 2017
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-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/privacy_policy.md:
--------------------------------------------------------------------------------
1 | ## Política de privacidad de DrawViewLibrary
2 | Esta Aplicación recoge algunos Datos Personales de sus Usuarios.
3 |
4 | #### Datos Personales recogidos para las siguientes finalidades y utilizando los siguientes servicios:
5 | Permisos sobre dispositivos para acceder a Datos Personales
6 | Permisos sobre dispositivos para acceder a Datos Personales
7 |
8 | Datos Personales: Permiso de almacenamiento y Permiso para la cámara
9 |
10 | Responsable de Tratamiento de los Datos y Titular
11 |
12 | #### Clases de Datos recogidos
13 | Entre las clases de Datos Personales que esta Aplicación recoge, ya sea directamente o a través de terceros, se encuentran:
14 |
15 | Permiso para la cámara y Permiso de almacenamiento.
16 |
17 | Otros Datos Personales recogidos pueden encontrarse descritos en otros apartados de la presente política de privacidad o en un texto explicativo específico mostrado contextualmente en el momento de la recogida de dichos Datos.
Los Datos Personales pueden ser proporcionados por el Usuario por su propia voluntad, o bien ser recogidos automáticamente durante la utilización de esta Aplicación.
18 | Salvo que se indique lo contrario, el uso de Cookies – o de otras medios de seguimiento – por esta Aplicación o por los propietarios de servicios de terceros utilizados por esta Aplicación tiene como finalidad la identificación de los Usuarios y el registro de sus preferencias, con la única finalidad de prestar el servicio solicitado por el Usuario.
19 | La negativa del Usuario a proporcionar ciertos Datos Personales podría imposibilitar a esta Aplicación la prestación de sus servicios.
20 |
21 | El Usuario asume la responsabilidad por los Datos Personales de terceros publicados o compartidos mediante esta Aplicación y declara que tiene el consentimiento de dichos terceros para proporcionar los Datos al Titular.
22 |
23 | ### Modalidad y lugar del Tratamiento de los Datos recogidos
24 |
25 | #### Modalidades de Tratamiento
26 |
27 | El Responsable de Tratamiento tratará los Datos de los Usuarios de manera adecuada y adoptará las medidas de seguridad apropiadas para impedir el acceso, la revelación, alteración o destrucción no autorizados de los Datos. El tratamiento de Datos se realiza mediante ordenadores y/o herramientas informáticas, siguiendo procedimientos y modalidades organizativas estrictamente relacionadas con las finalidades señaladas. Además del Responsable de Tratamiento, en algunos casos podrán acceder a los Datos ciertas categorías de personas encargadas relacionadas con el funcionamiento de la página (administración, ventas, marketing, departamento jurídico y de administración de sistemas) o contratistas externos que presten servicios al Responsable de Tratamiento (tales como proveedores externos de servicios técnicos, empresas de mensajería, “hosting providers”, empresas de informática, agencias de comunicación) que serán nombrados por el Titular como Encargados del Tratamiento, si fuera necesario. Se podrá solicitar al Responsable de Tratamiento en cualquier momento una lista actualizada de dichas personas.
28 |
29 | ### Lugar
30 |
31 | Los Datos serán tratados en la sede operativa del Responsable de Tratamiento, así como en otros lugares en los que se encuentren situadas las partes que también estén involucradas en dicho tratamiento. Para más información, por favor póngase en contacto con el Responsable de Tratamiento.
32 |
33 | ### Periodo de conservación
34 |
35 | Los Datos serán tratados durante el plazo necesario para prestar el servicio solicitado por el Usuario, o el que se requiera en función de las finalidades descritas en este documento, y el Usuario tendrá en todo momento la facultad de solicitar la interrupción de su Tratamiento o la cancelación de los Datos.
36 |
37 | ## Finalidad del Tratamiento de los Datos recogidos
38 |
39 | Los Datos relativos al Usuario son recogidos para permitir al Titular la prestación de sus servicios, así como para las siguientes finalidades:
40 |
41 | Permisos sobre dispositivos para acceder a Datos Personales.
42 |
43 | Los Datos Personales utilizados para cada finalidad son descritos en los apartados específicos de este documento.
44 |
45 | ### Permisos sobre dispositivos para acceder a Datos Personales
46 |
47 | Esta Aplicación solicita determinados permisos a los Usuarios, que le permiten acceder al dispositivo del Usuario tal como se describe a continuación.
48 |
49 | Por defecto, el Usuario deberá otorgar estos permisos antes de que se pueda acceder a la información en cuestión. Tras conceder el permiso, el Usuario podrá revocarlo en cualquier momento. Para revocar estos permisos, los Usuarios podrán utilizar las opciones de configuración del dispositivo o bien contactar con el Titular para obtener su ayuda mediante los datos de contacto que aparecen en el presente documento. El procedimiento concreto para controlar los permisos de la aplicación puede depender del dispositivo del Usuario así como del software que utilice.
50 |
51 | Debe tenerse en cuenta que la revocación de dichos permisos puede afectar al correcto funcionamiento de esta Aplicación.
52 |
53 | Si el Usuario otorga cualquiera de los permisos que se relacionan más abajo, autoriza a esta Aplicación a tratar los correspondientes Datos Personales (p.ej. acceder a ellos, modificarlos o eliminarlos).
54 |
55 | #### Permiso de almacenamiento
56 |
57 | Se utiliza para acceder al almacenamiento externo compartido, incluyendo la posibilidad de leer y añadir cualquier elemento.
58 |
59 | #### Permiso para la cámara
60 |
61 | Se utiliza para acceder a la cámara o bien para captar imágenes y hacer grabaciones de vídeo desde el dispositivo.
62 |
63 | ## Información detallada del tratamiento de los Datos Personales
64 |
65 | Se recogen Datos Personales para las siguientes finalidades y utilizando los siguientes servicios:
66 |
67 | Permisos sobre dispositivos para acceder a Datos Personales
68 |
69 | Esta Aplicación solicita determinados permisos a los Usuarios, que le permiten acceder al dispositivo del Usuario tal como se describe a continuación.
70 |
71 | Permisos sobre dispositivos para acceder a Datos Personales (Esta Aplicación)
72 | Esta Aplicación solicita determinados permisos a los Usuarios, que le permiten acceder al dispositivo del Usuario tal como se describe en este documento.
73 |
74 | Datos Personales recogidos:
75 | Permiso de almacenamiento y Permiso para la cámara.
76 |
77 | ## Información adicional sobre la recogida de Datos y su tratamiento
78 |
79 | Defensa jurídica
80 |
81 | Los Datos Personales del Usuario podrán ser utilizados para la defensa jurídica del Titular en juicio o en las fases prejudiciales previas a un posible pleito derivado del uso abusivo por parte del Usuario de esta Aplicación o de los servicios relacionados. El Usuario es consciente de que el Titular puede ser requerido por autoridades públicas a fin de revelar Datos Personales.
82 |
83 | ### Información adicional acerca de los Datos Personales del Usuario
84 |
85 | Además de las informaciones contenidas en esta política de privacidad, esta Aplicación podrá proporcionar al Usuario información contextual relativa a servicios específicos o a la recogida y tratamiento de los Datos Personales.
86 |
87 | Log del sistema y mantenimiento
88 |
89 | Por motivos relativos al funcionamiento y el mantenimiento, esta Aplicación y cualesquiera otros servicios de terceros que se utilicen podrán recoger un Log del sistema, esto es, archivos que registren las interacciones y que pueden contener Datos Personales, tales como la dirección IP del Usuario.
90 |
91 | ### Información no contenida en esta política de privacidad
92 |
93 | Se podrá solicitar en cualquier momento información adicional sobre la recogida y el tratamiento de los Datos Personales al Responsable de Tratamiento. Encontrará la información de contacto al inicio del presente documento.
94 |
95 | ### Ejercicio de los derechos por los Titulares de los Datos
96 |
97 | Los titulares a los que se refieren los Datos Personales tienen derecho a obtener en cualquier momento la confirmación de que estos han sido almacenados por el Responsable de Tratamiento, a conocer su contenido y origen, a verificar su exactitud o solicitar que sean completados, cancelados, actualizados o rectificados, a que sean anonimizados o a que se bloqueen aquellos Datos Personales que están siendo tratados en contravención de las leyes, así como a oponerse a su tratamiento por cualquier motivo legítimo. Las solicitudes deberán remitirse al Responsable de Tratamiento utilizando los datos de contacto indicados anteriormente.
98 |
99 | Esta Aplicación no permite solicitudes “Do Not Track”. Para determinar si cualquiera de los servicios de terceros que utiliza acepta solicitudes “Do Not Track”, por favor lea sus políticas de privacidad.
100 |
101 |
102 | ### Modificación de esta política de privacidad
103 |
104 | El Responsable de Tratamiento se reserva el derecho de modificar esta política de privacidad en cualquier momento notificándolo a los Usuarios a través de esta página. Se recomienda encarecidamente que revisen esta página con frecuencia, tomando como referencia la fecha de la última modificación indicada al final. En el caso de que un Usuario esté en desacuerdo con alguna de las modificaciones realizadas a esta Política, el Usuario deberá cesar en el uso de esta Aplicación y podrá solicitar al Responsable de Tratamiento que elimine sus Datos Personales. Salvo que se indique lo contrario, la política de privacidad vigente en cada momento será de aplicación a todos los Datos Personales que el Responsable de Tratamiento haya recogido hasta entonces.
105 |
106 | ### Información acerca de esta política de privacidad
107 |
108 | El Responsable de Tratamiento es responsable de esta política de privacidad, que ha sido redactada a partir de los módulos proporcionados por Iubenda y almacenados en los servidores de Iubenda.
109 |
110 | ### Definiciones y referencias legales
111 |
112 | #### Datos Personales (o Datos)
113 |
114 | Constituye un dato personal cualquier información relativa a una persona física, identificada o identificable, aunque sea indirectamente, mediante referencia a cualquier otra información, inclusive a un número de identificación personal.
115 |
116 | #### Datos de Uso<
117 |
118 | Las informaciones recogidas de forma automática por esta Aplicación (o por servicios de terceros utilizados por esta Aplicación), que podrán incluir: las direcciones IP o nombres de dominio de los ordenadores utilizados por el Usuario que se conecte a esta Aplicación, las direcciones URI (Uniform Resource Identifier), la hora de la solicitud, el método utilizado para realizar la solicitud al servidor, las dimensiones del archivo obtenido en respuesta, el código numérico indicando el estado de la respuesta del servidor (resultado satisfactorio, error, etc…), el país de origen, las características del navegador y del sistema operativo utilizados por el visitante, las diversas coordenadas temporales de la visita (por ejemplo, el tiempo de permanencia en cada una de las páginas) y los detalles relativos al itinerario seguido dentro de la Aplicación, con especial referencia a la secuencia de páginas consultadas, a los parámetros relativos al sistema operativo y al entorno informático del Usuario.
119 |
120 | #### Usuario
121 |
122 | El individuo que utiliza esta Aplicación, que debe coincidir con el Titular de los Datos o bien haber sido autorizado por éste y cuyos Datos Personales son objeto de tratamiento.
123 |
124 | #### Titular de los Datos
125 |
126 | La persona física o jurídica a la que se refieren los Datos Personales.
127 |
128 | #### Encargado del Tratamiento
129 |
130 | La persona física, jurídica, administración pública o cualquier otra institución, asociación u organización autorizada por el Responsable de Tratamiento a tratar los Datos Personales de conformidad con esta política de privacidad.
131 |
132 | #### Responsable de Tratamiento (o Titular)
133 |
134 | La persona física, jurídica, administración pública o cualquier otra institución, asociación u organización con la facultad, incluso solidariamente con otro Responsable de Tratamiento, de tomar decisiones relativas a la finalidad, los métodos de tratamiento de los Datos Personales y los medios utilizados, incluyendo las medidas de seguridad relativas al funcionamiento y el uso de esta Aplicación. A menos que se especifique lo contrario, el Responsable de Tratamiento es el Titular de esta Aplicación.
135 |
136 | #### Esta Aplicación
137 |
138 | La herramienta de hardware o software mediante la cual se han recogidos los Datos Personales del Usuario.
139 |
140 | #### Información legal
141 |
142 | Aviso a los Usuarios europeos: la presente declaración de privacidad ha sido redactada en cumplimiento de las obligaciones previstas en el Art. 10 de la Directiva 95/46/CE, y de acuerdo con las disposiciones de la Directiva 2002/58/CE, modificada por la Directiva 2009/136/CE, en materia de Cookies.
143 |
144 | #### Esta política de privacidad se refiere únicamente a esta Aplicación.
145 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':drawview'
2 |
--------------------------------------------------------------------------------