GithubHelp home page GithubHelp logo

myinnos / awesomeimagepicker Goto Github PK

View Code? Open in Web Editor NEW
163.0 4.0 37.0 1.75 MB

Awesome Image Picker library will pick images/gifs with beautiful interface. Supports image or gif, Single and Multiple Image selection.

License: Apache License 2.0

Java 100.00%
image images multiple-files android-library imagepicker gif gifpicker image-picker

awesomeimagepicker's Introduction

Awesome Image Picker

Awesome Image Picker library will pick images/gifs with beautiful interface. Supports image or gif, Single and Multiple Image selection.

Awesome Image Picker - Example1 Awesome Image Picker - Example2 Awesome Image Picker - Example3 Awesome Image Picker - Example4

Download Demo APK from HERE

Kindly use the following links to use this library:

In build.gradle (Project)

allprojects {
  repositories {
			...
		maven { url "https://jitpack.io" }
	}
}

And then in the other gradle file(may be your app gradle or your own module library gradle, but never add in both of them to avoid conflict.)

dependencies {
    compile 'com.github.myinnos:AwesomeImagePicker:1.0.2'
}

How to use

Step 1: start intent to open awesome image picker gallery:

Intent intent = new Intent(this, AlbumSelectActivity.class);
intent.putExtra(ConstantsCustomGallery.INTENT_EXTRA_LIMIT, <LIMIT>); // set limit for image selection
startActivityForResult(intent, ConstantsCustomGallery.REQUEST_CODE);

Step 2: onActivityResult : #Example

@Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == ConstantsCustomGallery.REQUEST_CODE && resultCode == Activity.RESULT_OK && data != null) {
            //The array list has the image paths of the selected images
            ArrayList<Image> images = data.getParcelableArrayListExtra(ConstantsCustomGallery.INTENT_EXTRA_IMAGES);

            for (int i = 0; i < images.size(); i++) {
                Uri uri = Uri.fromFile(new File(images.get(i).path));
                // start play with image uri
                ..........
            }
        }
    }

IMP Note: Require STORAGE_PERMISSIONS if Build.VERSION.SDK_INT >= 23.

Any Queries? or Feedback, please let me know by opening a new issue!

Contact

Prabhakar Thota

If you appreciate my work, consider buying me a cup of โ˜• to keep me recharged ๐Ÿค˜ by PayPal

License

Copyright 2017 MyInnos

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

awesomeimagepicker's People

Contributors

myinnos avatar samirthebti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

awesomeimagepicker's Issues

Translations

First of all, thank you for making this. It's the first library of its kind that I found actually works with Marshmallow.

My only issue with it is the strings - is there a way for us to change them as a user of the library? I like to have my app ready for translation and this library would prevent some strings from being able to be translated. For example, the message that appears when the user selects too many photos.

Many thanks in advance.

Throws IllegalArgument exception in Lollipop

Exception java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vitech.storiesofcommonman/in.myinnos.awesomeimagepicker.activities.AlbumSelectActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.support.v7.widget.Toolbar$d instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/toolbar. Make sure other views do not use the same id.

Yes there was another toolbar with Id toolbar but the same gets thrown even after I changed its ID to tool_bar.

This bug appears only in lollipop and it started appearing after i used progaurd.

cant change theme as per I want..

Hello, thanks for this library. Its very useful. But can u please add theme feature, as its not match as per my theme like, toolbar color, light/dark theme, custom font typeface.. Its just suggestion because it looks like u used 3rd party libs and some of client also want same pattern.. ๐Ÿ‘

Bug

why throw Exception when rotate screen at image picker Activity !

FATAL EXCEPTION: main
Process: scit.com.appointmentsmanagmentsys, PID: 25427
java.lang.RuntimeException: Unable to start activity ComponentInfo{scit.com.appointmentsmanagmentsys/in.myinnos.awesomeimagepicker.activities.AlbumSelectActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.support.v7.widget.Toolbar$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/toolbar. Make sure other views do not use the same id.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2461)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2521)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4164)
at android.app.ActivityThread.access$1000(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1389)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5517)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.support.v7.widget.Toolbar$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/toolbar. Make sure other views do not use the same id.

Landscape mode ?

Hello,

Why isn't possible to have a landscape view ? portrait view is locked. Its a problem for most tablets wich use landscape mode most of time.

Error

In ActivityForResult in the getParsebale line me error ( red underline ) hai aur in uri from file lin eme path me error hai pls solve

Crash when change screen orientation

Crash when change screen orientation..

I've fix this issue, when I add this code in manifest.
<activity android:name="in.myinnos.awesomeimagepicker.activities.AlbumSelectActivity" android:screenOrientation="portrait" />
<activity android:name="in.myinnos.awesomeimagepicker.activities.ImageSelectActivity" android:screenOrientation="portrait" />

Update Glide Version

No virtual method load(Landroid/net/Uri;)Lcom/bumptech/glide/DrawableTypeRequest; in class Lcom/bumptech/glide/j; or its super classes (declaration of 'com.bumptech.glide.j' appears in

show selected images with ticks

I have successfully implemented the library. But it seems there is one bug, when user has selected n images and goes back to his screen there I am showing selected images. But when user goes for second time in library the shown images should be shown selected. Is there a way to do this?.

C:\Users\Admin\.gradle\caches\transforms-1\files-1.1\AwesomeImagePicker-1.0.2.aar\b60625765eb2a137a082d01582b2b222\res\layout\grid_view_item_album_select.xml

this type of error come after updating version 26

Error:error: resource color/multiple_image_select_albumTextBackground (aka com.styleapp:color/multiple_image_select_albumTextBackground) not found.
Error:error: resource color/multiple_image_select_primary (aka com.styleapp:color/multiple_image_select_primary) not found.
Error:resource color/multiple_image_select_albumTextBackground (aka com.styleapp:color/multiple_image_select_albumTextBackground) not found.
Error:resource color/multiple_image_select_primary (aka com.styleapp:color/multiple_image_select_primary) not found.
Error:failed linking file resources.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Error

In ActivityForResult in the getParsebale line me error ( red underline ) hai aur in uri from file lin eme path me error hai pls solve

java.lang.NoSuchFieldError

When i just click on a album item it will rais exception :-

Process: com.elitetechnocrats.dev.jayair, PID: 24409
java.lang.NoSuchFieldError: No static field layout_image_select of type I in class Lin/myinnos/awesomeimagepicker/R$id; or its superclasses (declaration of 'in.myinnos.awesomeimagepicker.R$id' appears in /data/app/com.elitetechnocrats.dev.jayair-2/split_lib_slice_6_apk.apk)
at in.myinnos.awesomeimagepicker.activities.ImageSelectActivity.onCreate(ImageSelectActivity.java:63)
at android.app.Activity.performCreate(Activity.java:6331)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2530)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1499)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5765)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

java.lang.NoSuchMethodError: No virtual method load(Landroid/net/Uri;)Lcom/bumptech/glide/DrawableTypeRequest;

My code :
sendImage.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
try{
Intent intent = new Intent(chat.this, AlbumSelectActivity.class);
intent.putExtra(ConstantsCustomGallery.INTENT_EXTRA_LIMIT, REQ_CODE_SELECT_IMAGE);
startActivityForResult(intent, ConstantsCustomGallery.REQUEST_CODE);
}
catch(Exception e){
toast(e.toString());
}
alert.dismiss();
}
});

Error Log :
07-27 15:58:09.054 27421 27421 E AndroidRuntime java.lang.NoSuchMethodError: No virtual method load(Landroid/net/Uri;)Lcom/bumptech/glide/DrawableTypeRequest; in class Lcom/bumptech/glide/RequestManager; or its super classes (declaration of 'com.bumptech.glide.RequestManager' appears in /data/app/com.sungbin.pubg.m.chatting-vVWfe3uWp2dJ2Bbtr5X6Tg==/base.apk)
at in.myinnos.awesomeimagepicker.adapter.CustomAlbumSelectAdapter.getView(CustomAlbumSelectAdapter.java:60)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.AbsListView.obtainView(AbsListView.java:3189)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.GridView.onMeasure(GridView.java:1102)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.View.measure(View.java:23297)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.View.measure(View.java:23297)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6928)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.View.measure(View.java:23297)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6928)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.LinearLayout.measureVertical(LinearLayout.java:806)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.View.measure(View.java:23297)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6928)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at com.android.internal.policy.DecorView.onMeasure(DecorView.java:899)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.View.measure(View.java:23297)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2849)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1879)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2134)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1748)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7785)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.Choreographer.doCallbacks(Choreographer.java:723)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.Choreographer.doFrame(Choreographer.java:658)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.os.Handler.handleCallback(Handler.java:789)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.os.Handler.dispatchMessage(Handler.java:98)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.os.Looper.loop(Looper.java:164)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at android.app.ActivityThread.main(ActivityThread.java:6944)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at java.lang.reflect.Method.invoke(Native Method)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
07-27 15:58:09.054 27421 27421 E AndroidRuntime at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

java.lang.NoSuchMethodError: No virtual method load(Landroid/net/Uri;)Lcom/bumptech/glide/DrawableTypeRequest;

                                                          java.lang.NoSuchMethodError: No virtual method load(Landroid/net/Uri;)Lcom/bumptech/glide/DrawableTypeRequest; in class Lcom/bumptech/glide/RequestManager; or its super classes (declaration of 'com.bumptech.glide.RequestManager' appears in /data/app/com.techweblearn.onlinechatapp-1/split_lib_dependencies_apk.apk:classes46.dex)
                                                                                at in.myinnos.awesomeimagepicker.adapter.CustomAlbumSelectAdapter.getView(CustomAlbumSelectAdapter.java:60)
                                                                                at android.widget.AbsListView.obtainView(AbsListView.java:2346)
                                                                                at android.widget.GridView.onMeasure(GridView.java:1065)
                                                                                at android.view.View.measure(View.java:18827)
                                                                                at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:716)
                                                                                at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:462)
                                                                                at android.view.View.measure(View.java:18827)
                                                                                at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
                                                                                at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
                                                                                at android.view.View.measure(View.java:18827)
                                                                                at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
                                                                                at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
                                                                                at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
                                                                                at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
                                                                                at android.view.View.measure(View.java:18827)
                                                                                at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5954)
                                                                                at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
                                                                                at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2643)
                                                                                at android.view.View.measure(View.java:18827)
                                                                                at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2136)
                                                                                at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1248)
                                                                                at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1484)
                                                                                at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1139)
                                                                                at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6064)
                                                                                at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860)
                                                                                at android.view.Choreographer.doCallbacks(Choreographer.java:672)
                                                                                at android.view.Choreographer.doFrame(Choreographer.java:608)
                                                                                at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846)
                                                                                at android.os.Handler.handleCallback(Handler.java:742)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                at android.os.Looper.loop(Looper.java:157)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5549)
                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:742)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.