zhihu / matisse Goto Github PK
View Code? Open in Web Editor NEW:fireworks: A well-designed local image and video selector for Android
License: Apache License 2.0
:fireworks: A well-designed local image and video selector for Android
License: Apache License 2.0
Android4.4.2 Kitkat
SM705
Smartisan OS v3.2.7
建议增加单独启动相机拍照,目前一般有图片选择的需求也会有拍照。
java.lang.NullPointerException: Attempt to invoke interface method 'void com.zhihu.matisse.engine.ImageEngine.loadThumbnail(android.content.Context, int, android.graphics.drawable.Drawable, android.widget.ImageView, android.net.Uri)' on a null object reference
Matisse.from(MainActivity.this) .choose(MimeType.allOf()) .countable(true) .maxSelectable(9) .restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) // .thumbnailScale(0.85f) // .imageEngine(new GlideEngine()) .forResult(REQUEST_CODE_CHOOSE);
裁剪和压缩用的比较多
...
compile 'com.zhihu.android:matisse:0.4.3'
compile 'com.github.bumptech.glide:glide:3.7.0'
java.lang.IllegalArgumentException: Width and height must be Target#SIZE_ORIGINAL or > 0
at com.bumptech.glide.GenericRequestBuilder.override(GenericRequestBuilder.java:564)
at com.bumptech.glide.BitmapRequestBuilder.override(BitmapRequestBuilder.java:435)
at com.zhihu.matisse.engine.impl.GlideEngine.loadThumbnail(GlideEngine.java:39)
at com.zhihu.matisse.internal.ui.widget.PhotoGrid.setImage(PhotoGrid.java:112)
at com.zhihu.matisse.internal.ui.widget.PhotoGrid.bindPhoto(PhotoGrid.java:80)
at com.zhihu.matisse.internal.ui.adapter.AlbumPhotosAdapter.onBindViewHolder(AlbumPhotosAdapter.java:111)
at com.zhihu.matisse.internal.ui.adapter.RecyclerViewCursorAdapter.onBindViewHolder(RecyclerViewCursorAdapter.java:44)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6356)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6389)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5335)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5598)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224)
at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:556)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:595)
at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3583)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3312)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
05-29 11:46:37.197 11265-11265/didikee.image2pdf E/AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:818)
at android.view.View.layout(View.java:18799)
at android.view.ViewGroup.layout(ViewGroup.java:5952)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2627)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2343)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1502)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7044)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927)
at android.view.Choreographer.doCallbacks(Choreographer.java:702)
at android.view.Choreographer.doFrame(Choreographer.java:638)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6646)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
what's wrong?
I get this:
Unable to load class 'org.gradle.api.internal.component.Usage'. Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
我使用的时候,发现根据Uri获取到的图片路径不能生成正确的file,FIie file = new File(uri.getPath());生成的这个file上传给服务器的时候报的路径不对
PNG("image/png", new HashSet(1) {
{
add("png");
}
}),
HashMap的默认大小是4,这样会浪费很多内存
it does not match latest code ...
gradle 失败,下面是log,请问这个这么破
Error:Unable to load class 'org.gradle.api.internal.component.Usage'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
I have read source code of the repo, a beautiful project! And I think the library can support more feature , such as select video. So can I create a pull request? Because in your README:
Better to open an issue to discuss with the team and the community if you're intended to work on something BIG.
As I see,there isn't any test in Matisse
.So why do you use travis
.
在华为手机上拍照功能不使用,拍照返回时有异常,提示“相机已经停止运行”,且没有错误log
场景是这样的:当选择九张图的时候,第一次选择了三张,再次点击选择的时候,前三张是否需要标记出来,且这一次只能选择六张。
05-04 11:53:07.868 4608 29537 E Parcel : Class not found when unmarshalling: com.zhihu.matisse.internal.entity.Item
05-04 11:53:07.868 4608 29537 E Parcel : java.lang.ClassNotFoundException: com.zhihu.matisse.internal.entity.Item
05-04 11:53:07.868 4608 29537 E Parcel : at java.lang.Class.classForName(Native Method)
05-04 11:53:07.868 4608 29537 E Parcel : at java.lang.Class.forName(Class.java:400)
05-04 11:53:07.868 4608 29537 E Parcel : at android.os.Parcel.readParcelableCreator(Parcel.java:2517)
05-04 11:53:07.868 4608 29537 E Parcel : at android.os.Parcel.readParcelable(Parcel.java:2471)
05-04 11:53:07.868 4608 29537 E Parcel : at android.os.Parcel.readValue(Parcel.java:2374)
05-04 11:53:07.868 4608 29537 E Parcel : at android.os.Parcel.readArrayMapInternal(Parcel.java:2727)
05-04 11:53:07.868 4608 29537 E Parcel : at android.os.BaseBundle.unparcel(BaseBundle.java:269)
05-04 11:53:07.868 4608 29537 E Parcel : at android.os.BaseBundle.getString(BaseBundle.java:992)
05-04 11:53:07.868 4608 29537 E Parcel : at android.content.Intent.getStringExtra(Intent.java:6702)
05-04 11:53:07.868 4608 29537 E Parcel : at com.android.server.am.ActivityStarter.startActivityLocked(ActivityStarter.java:336)
05-04 11:53:07.868 4608 29537 E Parcel : at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1097)
05-04 11:53:07.868 4608 29537 E Parcel : at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:5767)
05-04 11:53:07.868 4608 29537 E Parcel : at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5572)
05-04 11:53:07.868 4608 29537 E Parcel : at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:176)
05-04 11:53:07.868 4608 29537 E Parcel : at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3573)
05-04 11:53:07.868 4608 29537 E Parcel : at android.os.Binder.execTransact(Binder.java:573)
05-04 11:53:07.868 4608 29537 E Parcel : Caused by: java.lang.ClassNotFoundException: com.zhihu.matisse.internal.entity.Item
05-04 11:53:07.868 4608 29537 E Parcel : at java.lang.Class.classForName(Native Method)
05-04 11:53:07.868 4608 29537 E Parcel : at java.lang.BootClassLoader.findClass(ClassLoader.java:1346)
05-04 11:53:07.868 4608 29537 E Parcel : at java.lang.BootClassLoader.loadClass(ClassLoader.java:1406)
05-04 11:53:07.868 4608 29537 E Parcel : at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
05-04 11:53:07.868 4608 29537 E Parcel : ... 16 more
05-04 11:53:07.868 4608 29537 E Parcel : Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
This library provides exactly what I need, except that it returns uris. It is not convenient to convert uris to actual path. Though there are some materials about using contentResolver to get the real path, but it is error prone especially for beginners.
hope there is a solution for this.
Hi guys, me again, I've made a fork of this library because I had to make some minor changes in order to use it into one of my projects, some of them I've already pull requested here, but the point is that I need to hide files that are not allowed by my application, for example, if I have Matisse.from(this).choose(MimeType.ofVideo(), false)
I want to hide all the media that aren't video files, that's an UX request from my development team, I've tried to change the AlbumMediaAdapter by filtering and I have some success, but I still have white frames in the RecyclerView, I don't get why, even trying to use notifyItemChanged
or notifyDatasetChanged
these gaps don't move away. Do you know why or there's a better way to achieve this?
These are the changes that I've made so far, I know that's not the best option doing this on adapter, but I need to achieve a fast prototype of this feature.
@Override
protected void onBindViewHolder(final RecyclerView.ViewHolder holder, Cursor cursor) {
final Item item = Item.valueOf(cursor);
if (holder instanceof CaptureViewHolder) {
CaptureViewHolder captureViewHolder = (CaptureViewHolder) holder;
Drawable[] drawables = captureViewHolder.mHint.getCompoundDrawables();
TypedArray ta = holder.itemView.getContext().getTheme().obtainStyledAttributes(
new int[]{R.attr.capture_textColor});
int color = ta.getColor(0, 0);
ta.recycle();
for (Drawable drawable : drawables) {
if (drawable != null) {
drawable.setColorFilter(color, PorterDuff.Mode.SRC_IN);
}
}
} else if (holder instanceof MediaViewHolder) {
MediaViewHolder mediaViewHolder = (MediaViewHolder) holder;
if (mSelectionSpec.mimeTypeSet.toString().contains(item.mimeType)) {
mediaViewHolder.mMediaGrid.preBindMedia(new MediaGrid.PreBindInfo(
getImageResize(mediaViewHolder.mMediaGrid.getContext()),
mPlaceholder,
mSelectionSpec.countable,
holder
));
mediaViewHolder.mMediaGrid.bindMedia(item);
mediaViewHolder.mMediaGrid.setOnMediaGridClickListener(this);
setCheckStatus(item, mediaViewHolder.mMediaGrid);
} else {
mediaViewHolder.mMediaGrid.setVisibility(View.GONE);
}
}
}
Thanks in advance. :)
I have an issue when use lib.
An error occurred with log:
Process: net.awpspace.cutecrop, PID: 26234 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/Glide; at com.zhihu.matisse.engine.impl.GlideEngine.loadThumbnail(GlideEngine.java:35) at com.zhihu.matisse.internal.ui.widget.PhotoGrid.setImage(PhotoGrid.java:112) at com.zhihu.matisse.internal.ui.widget.PhotoGrid.bindPhoto(PhotoGrid.java:80) at com.zhihu.matisse.internal.ui.adapter.AlbumPhotosAdapter.onBindViewHolder(AlbumPhotosAdapter.java:111) at com.zhihu.matisse.internal.ui.adapter.RecyclerViewCursorAdapter.onBindViewHolder(RecyclerViewCursorAdapter.java:44) at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6356) at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6389) at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5335) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5598) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224) at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:556) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:595) at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3583) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3312) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) at android.widget.FrameLayout.onLayout(FrameLayout.java:574) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) at android.widget.FrameLayout.onLayout(FrameLayout.java:574) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) at android.widget.FrameLayout.onLayout(FrameLayout.java:574) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813) at android.widget.LinearLayout.onLayout(LinearLayout.java:1722) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) at android.widget.FrameLayout.onLayout(FrameLayout.java:574) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813) at android.widget.LinearLayout.onLayout(LinearLayout.java:1722) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:639) at android.widget.FrameLayout.onLayout(FrameLayout.java:574) at android.view.View.layout(View.java:16001) at android.view.ViewGroup.layout(ViewGroup.java:5181) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2484) at android.view.ViewRootImpl.performTra
How to resolve this? thanks!
if (storageDir != null && storageDir.isDirectory() && !storageDir.exists()) {
storageDir.mkdirs();
}
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(new File(path))));
不知道为什么Matisse中没有解决上面几个问题。
Hi, I would like to use Matisse on a project that I'm woking on but I've noticed that this lib doesn't have support to another languages other than english, is it right? is there a way to achieve it?
我设置完capture和captureStrategy后,拍照完成后可以获取图片uri,但是我再次点击进入,刚才拍摄的照片并没有显示出来,我退出到桌面后,后台杀掉应用再进入,刚才拍摄的照片才出现,问这时什么原因造成的,如何解决???
I guess that single select
is used for choosing a photo as user's avatar
. #55
Up to now,I have not come up with situations where Matisse
can be used.
As the author @gejiaheng said
Matisse is a well-designed local image and video selector for Android.
In my life,android app selector
has two main usage:
wechat
and QQ
It seems Matisse
can not perform well as needed.However developer can develop their selector based on
Matisse
.So I do not think the gradle import
is necessary because every developer cannt use this lib directly.
新的0.5.2这个版本,我只能设置是选择图片还是视频,但是我希望用户只能看到图片或者视频,这个应该怎么处理
It is better to refresh the gallery in the same page when adding new photos, rather than close the gallery page and re-enter again.
Hi,How do you get the latest photo data? I use ContentResolver to get pictures sometimes can not get the latest pictures, although I saw your source, but the ability is limited, did not see where to do the operation, you can Take the time to help me?
Hi ! i just want to know what changes i have to do to select images and videos at same time. Currently the library is not allowing to select mix types.
Seems like there is no text color customization for preview mode apply text via attrs
bottomToolbar.apply.textColor
That one isn't applied for suggested property.
Thank you.
Only images show up to be selected, no videos
项目默认引入两个图片加载框架是否太多余,能否弄个类似retorfit的adapter机制,让用户自己选择图片加载框架
<string name="album_name_all">全部</string>
<string name="button_preview">預覽</string>
<string name="button_apply_disable">使用</string>
<string name="button_apply">使用(%1$d)</string>
<string name="button_back">返回</string>
<string name="photo_grid_capture">拍一張</string>
<string name="empty_text">還沒有圖片或影片</string>
<string name="button_ok">我知道了</string>
<string name="error_over_count_default">您已經達到最大選擇數量</string>
<string name="error_over_count">最多只能選擇 %1$d 個文件</string>
<string name="error_under_quality">圖片質量太低</string>
<string name="error_over_quality">圖片質量太高</string>
<string name="error_file_type">不支援的文件類型</string>
<string name="error_type_conflict">不能同時選擇圖片和影片</string>
<string name="error_no_video_activity">沒有支援影片預覽的應用程式</string>
captureStrategy(new CaptureStrategy(true, "com.zhihu.matisse.sample.fileprovider"))这是我拍照的代码
Process: com.zhihu.matisse.sample, PID: 18814
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zhihu.matisse.sample/com.zhihu.matisse.ui.MatisseActivity}: android.view.InflateException: Binary XML file line #31: Binary XML file line #31: Error inflating class TextView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2449)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5527)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: android.view.InflateException: Binary XML file line #31: Binary XML file line #31: Error inflating class TextView
at android.view.LayoutInflater.inflate(LayoutInflater.java:543)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.zhihu.matisse.ui.MatisseActivity.onCreate(MatisseActivity.java:83)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5527)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: android.view.InflateException: Binary XML file line #31: Error inflating class TextView
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:786)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:842)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.zhihu.matisse.ui.MatisseActivity.onCreate(MatisseActivity.java:83)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5527)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 5: TypedValue{t=0x2/d=0x7f010004 a=-1}
at android.content.res.TypedArray.getColorStateList(TypedArray.java:484)
at android.widget.TextView.<init>(TextView.java:1046)
at android.widget.TextView.<init>(TextView.java:674)
at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:62)
at android.support.v7.widget.AppCompatTextView.<init>(AppCompatTextView.java:58)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1029)
at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1087)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:47)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:839)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:842)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:802)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.zhihu.matisse.ui.MatisseActivity.onCreate(MatisseActivity.java:83)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5527)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) ```
我项目中用到glide,不想再依赖picasso,于是打包混淆的时候就报错了,添加picasso后正常,能不能解耦一些
但是其他app,比如闲鱼是正常的
You stated this is image and video selecting gallery, but I cannot see videos. In the MimeType enum, I only see images...
看到README的第一张截图是有拍照的,但是在实际代码中并未有支持拍照的相关配置。
尝试运行了sample之后发现也是不可以的,所以其实是不支持拍照的?
Hi,
Is it possible to add single selection functionality to the library?
I know that you can set maxSelectable(1) but I think that the user experience will be way better if the user can just select the photo, instead of "checking" and then clicking on "apply".
Thanks! Keep up the good work!
作者你好,感谢分享这么棒的一个 repo,也感谢你积极地回复 issue.
目前我出现了部分照片无法预览的问题。
通过观察发现,我手机里某些文件夹里面的图片,是无法预览的(就是点击缩略图之后,跳转的界面不显示图片)
我总结应该是与这个图片的路径有关吧,整个 Camera 文件夹下的图片都无法预览
搜索了 wiki 好像并不是我使用姿势的问题,请问下作者如何解决呢?
Hey there!
As of 0.4.3, the library doesn't support video selection so I was wondering when the recent changes would be released :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.