Coder Social home page Coder Social logo

liuling07 / photopicker Goto Github PK

View Code? Open in Web Editor NEW
330.0 330.0 131.0 18.48 MB

An android library to pick photo from gallery

Home Page: https://raw.githubusercontent.com/liuling07/PhotoPicker/master/sample.apk

License: Apache License 2.0

Java 100.00%

photopicker's People

Contributors

lijia92 avatar liuling07 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

photopicker's Issues

加载一些图片会崩溃

加载了bitmap factory 解析不了的图片时,bitmap变为空。在imgaeLoader 的getFormatBitmap里添加为null 返回false ,解决了

app中使用application 后lib无法获取context

10-26 14:41:16.444: I/System.out(17766): java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File android.content.Context.getExternalCacheDir()' on a null object reference
10-26 14:41:16.444: I/System.out(17766):    at com.lling.photopicker.utils.OtherUtils.getDiskCacheDir(OtherUtils.java:113)
10-26 14:41:16.444: I/System.out(17766):    at com.lling.photopicker.utils.ImageLoader.initDiskCache(ImageLoader.java:145)
10-26 14:41:16.444: I/System.out(17766):    at com.lling.photopicker.utils.ImageLoader.init(ImageLoader.java:63)
10-26 14:41:16.444: I/System.out(17766):    at com.lling.photopicker.utils.ImageLoader.<init>(ImageLoader.java:58)
10-26 14:41:16.444: I/System.out(17766):    at com.lling.photopicker.utils.ImageLoader.getInstance(ImageLoader.java:110)
10-26 14:41:16.444: I/System.out(17766):    at com.lling.photopicker.adapters.PhotoAdapter.getView(PhotoAdapter.java:198)
10-26 14:41:16.444: I/System.out(17766):    at android.widget.AbsListView.obtainView(AbsListView.java:2346)
10-26 14:41:16.444: I/System.out(17766):    at android.widget.GridView.onMeasure(GridView.java:1065)
10-26 14:41:16.444: I/System.out(17766):    at android.view.View.measure(View.java:18811)

你好,当我app也有一个application时,lib会无法获取context,抛NullPointerException

<application
        android:allowBackup="true"
        android:name=".AppApplication"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        tools:replace="android:name">

目前经过查找资料使用的方法是:我的application继承你lib中的application解决的
http://stackoverflow.com/questions/7157501/is-it-possible-to-get-applications-context-in-an-android-library-project
请问还有其他的解决方法吗?

viewstub inflate

i have problem in photo floder's first time animation.
i use translation animation to show the viewstub list,but the first time,it just appear without any animation.
the reason i find is that the view is not rendered so the animation doesn't work.
but why I user ObjectAnimator.ofFloat(view...) works well?

Out of memory

qq 20160113100413
加载正常图片没问题,但是在加载(微博)长图,例如439*4268px这种尺寸的图,就会报内存溢出了。

優化:獲取所有和最新照片 相冊為空的時候處理

拍照完畢通知系統相冊更新:context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + path)));
獲取手機内部所有圖片 :Cursor mCursor = mContentResolver.query(imageUri,null, null,null,Media.DATE_ADDED+" desc");
遍歷相冊的時候:用do{} while();結構,確保獲取第一個
相冊為空時候:if (!mCursor.moveToFirst()){ mCursor.close(); return floderMap;} 游標是否爲空 相應的地方均要做判空處理

相机与图片显示问题

在设置的是显示相机且为单选的情况下:
相册没有照片时不显示相机,点击左下角图片会崩溃;
如果有一张图片,会显示相机,但不显示图片

崩溃问题我加了判断了,显示问题不知道怎么修改,能否指教下,谢谢!

没有6.0权限控制

启动就蹦,手动开了摄像和存储访问权限后才能运行。选择图片时往下滑就会报错,在PhotoPickerActivity的OnDestroy加

if(mProgressDialog != null){
            mProgressDialog.dismiss();
        }

后面滑动还是会报空指针错误

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.