Android Open Source - mobilib Mbl Image Input






From Project

Back to project page mobilib.

License

The source code is released under:

MIT License

If you think the Android project mobilib listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.datdo.mobilib.imageinput;
//from   w ww  .j a  v a2s .  c  om
import android.os.Environment;

public class MblImageInput {
    static String      sFolderToSaveTakenImages     = Environment.getExternalStorageDirectory() + "/" + Environment.DIRECTORY_DCIM;
    static String[]    sExtensionsOfPickedImages    = new String[] {
        "jpg",
        "jpeg",
        "png",
        "gif"
    };
    static String[]    sFoldersToPickImages         = new String[] {
        Environment.DIRECTORY_DCIM,
        Environment.DIRECTORY_PICTURES
    };
    static float sCropMinZoom = 1;
    static float sCropMaxZoom = 2;

    /**
     * <pre>
     * Configure this library.
     * This method is not mandatory. If you don't call this method, default values will be used.
     * Pass NULL for parameters those you want to use default values.
     * </pre>
     * @param folderToSaveTakenImages folder to save image taken by camera
     * @param extensionsOfPickedImages 
     * @param foldersToPickImages folders to pick images. Folder paths must be relative (like "DCIM", "Pictures"...). Images will be scanned from both device memory and removable memory (SDCard).
     * @param cropMinZoom minimum zoom scale for cropping
     * @param cropMaxZoom maximum zoom scale for cropping
     */
    public static void configure(
            String      folderToSaveTakenImages,
            String[]    extensionsOfPickedImages,
            String[]    foldersToPickImages,
            Float       cropMinZoom,
            Float       cropMaxZoom) {

        if (folderToSaveTakenImages != null) {
            sFolderToSaveTakenImages    = folderToSaveTakenImages;
        }
        if (extensionsOfPickedImages != null) {
            sExtensionsOfPickedImages   = extensionsOfPickedImages;
        }
        if (foldersToPickImages != null) {
            sFoldersToPickImages        = foldersToPickImages;
        }
        if (cropMinZoom != null) {
            sCropMinZoom = cropMinZoom;
        }
        if (cropMaxZoom != null) {
            sCropMaxZoom = cropMaxZoom;
        }
    }
}




Java Source Code List

com.datdo.mobilib.api.DBBase.java
com.datdo.mobilib.api.DBHelper.java
com.datdo.mobilib.api.MblApi.java
com.datdo.mobilib.api.MblCache.java
com.datdo.mobilib.api.MblException.java
com.datdo.mobilib.api.MblSSLCertificateUtils.java
com.datdo.mobilib.base.MblActivityPlugin.java
com.datdo.mobilib.base.MblBaseActionBarActivity.java
com.datdo.mobilib.base.MblBaseActivity.java
com.datdo.mobilib.base.MblBaseAdapter.java
com.datdo.mobilib.base.MblBaseApplication.java
com.datdo.mobilib.base.MblBaseFragmentActivity.java
com.datdo.mobilib.base.MblDecorView.java
com.datdo.mobilib.base.MblNetworkStatusChangedReceiver.java
com.datdo.mobilib.event.MblCommonEvents.java
com.datdo.mobilib.event.MblEventCenter.java
com.datdo.mobilib.event.MblEventListener.java
com.datdo.mobilib.event.MblStrongEventListener.java
com.datdo.mobilib.event.MblWeakArrayList.java
com.datdo.mobilib.imageinput.MblAutoResizeSquareImageView.java
com.datdo.mobilib.imageinput.MblDataInputActivity.java
com.datdo.mobilib.imageinput.MblImageFolderScanner.java
com.datdo.mobilib.imageinput.MblImageInput.java
com.datdo.mobilib.imageinput.MblImagePickingScanEngine.java
com.datdo.mobilib.imageinput.MblPickImageActivity.java
com.datdo.mobilib.imageinput.MblPickImageGridViewAdapter.java
com.datdo.mobilib.imageinput.MblTakeImageActivity.java
com.datdo.mobilib.util.MblAsyncTask.java
com.datdo.mobilib.util.MblImageLoader.java
com.datdo.mobilib.util.MblLinkMovementMethod.java
com.datdo.mobilib.util.MblUrlRecognizer.java
com.datdo.mobilib.util.MblUtils.java
com.datdo.mobilib.widget.MblHorizontalViewPager.java
com.datdo.mobilib.widget.MblListViewWithScrollableItems.java
com.datdo.mobilib.widget.MblSequenceImage.java
com.datdo.mobilib.widget.MblSideMenuEnabledLayout.java
com.datdo.mobilib.widget.MblTouchImageView.java