Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glide on android 6.0 #1138

Closed
smallobserver opened this issue Apr 19, 2016 · 14 comments
Closed

glide on android 6.0 #1138

smallobserver opened this issue Apr 19, 2016 · 14 comments
Labels

Comments

@smallobserver
Copy link

in my project, I use Glide for loading image. It's easy to use.
but when I run my project on SAMSUNG Note5 android system 6.0, the image was very small when the first time image loading.

I try to load again , it had been normal

@WaylanPunch
Copy link

@smallobserver You may want to try the .override(width, height) method, I think it might help to solve your problem.

@smallobserver
Copy link
Author

@WaylanPunch but I run this proiect on other phone it normal .... only run on android 6.0 ... and only the first time load the image was not right

@smallobserver
Copy link
Author

@WaylanPunch and the .override not solve my problem...

@TWiStErRob
Copy link
Collaborator

Can you create a small reproducing sample app? This sounds like an issue we can't resolve just by talking about it. It's enough if you can paste your Java and Layout files here, which don't depend on other code from your app.

@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Apr 19, 2016

You might also want to look at https://github.com/bumptech/glide/wiki/Debugging-and-Error-Handling if there's just a small issue not related to layout and stuff.

@smallobserver
Copy link
Author

@TWiStErRob now I know why this problem I use the .placeholder() method . I setting a .9 image . so how can I do... only on android 6.0 it will show

@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Apr 19, 2016

I guess you-re using wrap_content, so the .9 image will be laid out as the smallest possible, because it has no intrinsic size. Change your layout XML to have at least one match_parent or fixed size.

@TWiStErRob
Copy link
Collaborator

Also then it's not really a Glide issue, imageView.setImageResource(R.drawable.ninepatch) should fail just as badly.

@smallobserver
Copy link
Author

@TWiStErRob but the .9 image will show normal :( and also I use match_parent not warp_content

@TWiStErRob
Copy link
Collaborator

So what is the issue then? Please share some code and describe actual/expected behavior, that is fill in the issue template: https://raw.githubusercontent.com/bumptech/glide/master/ISSUE_TEMPLATE.md

@silentcmz
Copy link

@smallobserver Solve your problem? I encountered the same problem,Can you tell me why? 3Q

@smallobserver
Copy link
Author

@silentcmz 你是中国人吗 ? are you chinese? I solve the problem
this problem The cause of the problem is to use the default image problems in 6.0 so just remove the default diagram in 6.0

@silentcmz
Copy link

@smallobserver 谢谢,我试了不适用9-path的图片就没问题,还有加上asbitmap 方法也没问题,但是不知道会有什么影响

@rokon338
Copy link

rokon338 commented Jul 28, 2016

@silentcmz thank you ! i encountered the same question,to solve this :
(1) don't use "src" or "background" attribute when use 9.path
(2) use asbitmap()
(3) use placeholder(9.path) to set the default picture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants