Open-source sharing 1 (StickerCamera + WeChat multi-Image Selection) and stickercamera multi-Image

Source: Internet
Author: User

Open-source sharing 1 (StickerCamera + Multi-image copying) and stickercamera multi-Image

Open source sharing 1


As a result of the project's needs, image pasters or tags will be added to the project in the future. If you find a similar open-source project on the internet, share it with you. In addition to this project, we also share an example of multi-graph selection. The following is a brief introduction.


I. StickerCamera

Introduction:

An APP that integrates cameras, image cropping, image pasters, and tags. The required compilation is java 8.

Running Effect display:





Instructions for use:
  • Implement camera functions
  • Allows you to crop images.

  • Image Filter Function

  • Add stickers for images (stickers can be moved, zoomed in, or rotated)

  • Add tags for images (can also be moved)

  • Save and display the created image locally

  • Many custom controls and a good project Architecture


2. Multi-image copying


Introduction:

Multi-Image Selection is achieved in imitation. You can select one or more modes.


Running Effect display:



Instructions for use:
1. Add the multi-image-selector module to the project as your project dependency.

2. Add the permission android. permission. READ_EXTERNAL_STORAGE in your AndroidManifest. xml file. Do not forget to declare the multiimageselect1_ti1_activity in AndroidManifest. xml.
3. Call in code
Intent intent = new Intent (mContext, multiimageselect?ti=. class); // whether to display the intent that calls the camera to take a photo. putExtra (multiimageselect?ti=. EXTRA_SHOW_CAMERA, true); // specifies the maximum number of intent images. putExtra (multiimageselect?ti=. EXTRA_SELECT_COUNT, 9); // sets the mode (single choice/multiimageselect1_tivity is supported. MODE_SINGLE or multiple options/multiimageselect?ti=. MODE_MULTI) intent. putExtra (multiimageselect?ti=. EXTRA_SELECT_MODE, multiimageselect?ti=. MODE_MULTI); startActivityForResult (intent, REQUEST_IMAGE );

4. Accept the result in your onActivityResult Method
@ Overrideprotected void onActivityResult (int requestCode, int resultCode, Intent data) {super. onActivityResult (requestCode, resultCode, data); if (requestCode = REQUEST_IMAGE) {if (resultCode = RESULT_ OK) {// obtain the List of returned images <String> path = data. getStringArrayListExtra (multiimageselect?ti=. EXTRA_RESULT); // process your own logic ....}}}

Display custom Activity
Class CustomerActivity extends Activity implements MultiImageSelectorFragment. callback {@ Override protected void onCreate (Bundle savedInstanceState) {// your own logic... bundle bundle = new Bundle (); bundle. putInt (MultiImageSelectorFragment. EXTRA_SELECT_COUNT, mDefaultCount); bundle. putInt (MultiImageSelectorFragment. EXTRA_SELECT_MODE, mode); <bundle class = "putBo"> </bundle> olean (MultiImageSelectorFragment. EXTRA_SHOW_CAMERA, isShow); // Add the master Fragment to Activity getSupportFragmentManager (). beginTransaction (). add (R. id. image_grid, Fragment. instantiate (this, MultiImageSelectorFragment. class. getName (), bundle )). commit () ;}@ Override public void onSingleImageSelected (String path) {// when the selection mode is set to single choice/MODE_SINGLE, this method will receive the data returned by Fragment} @ Override public void onImageSelected (String path) {// an image is selected as a trigger, here you can customize your own Actionbar behavior} @ Override public void onImageUnselected (String path) {// If an image is deselected, here you can customize your own Actionbar behavior} @ Override public void onCameraShot (File imageFile) {// when the camera is set, the user will return the photo File after taking the photo }}

Note: You can refer to the implementation of multiimageselectoracti.pdf. java.


Okay, I will not talk about it anymore.

:Http://download.csdn.net/download/gao_chun/9076993




Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.