나는 내 애플리케이션에서 OutOfMemory 오류을 직면하고있다. 이유는 내 애플리케이션에 많은 이미지가로드되어있다. 가능한 해결책을 찾다가이 링크를 발견하고 전체를 다운로드했다. 샘플 프로젝트 내 경우에 이미지를 온라인으로로드 것만 나는 내 문제와 관련이 찾을 http://developer.android.com/training/displaying-bitmaps/index.html비트 맵 드로어 드로어
, 내 응용 프로그램의 모든 이미지는 그래서
내 질문에 ... 드로어 블에서 찾을 수 있습니다 입니다, 내 drawabl에서 이미지를 사용할 수 있습니까? 특정 URL에서로드하지 말고 그것이 있다면, 친절하게 제게 그것의 아주 간단한 샘플을주세요. ...
나는 안드로이드 개발에 새로운 Im와 튜토리얼 온라인에 의존하는 Im 이후로 정말로 어려움을 겪고 있습니다. 감사합니다.
다음내가
public class Images {
/**
* This are PicasaWeb URLs and could potentially change. Ideally the PicasaWeb API should be
* used to fetch the URLs.
*
* Credit to Romain Guy for the photos:
* http://www.curious-creature.org/
* https://plus.google.com/109538161516040592207/about
* http://www.flickr.com/photos/romainguy
*/
public final static String[] imageUrls = new String[] {
"https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/AAAAAAAAAbs/rWlj1RUKrYI/s1024/A%252520Photographer.jpg",
"https://lh4.googleusercontent.com/--dq8niRp7W4/URquVgmXvgI/AAAAAAAAAbs/-gnuLQfNnBA/s1024/A%252520Song%252520of%252520Ice%252520and%252520Fire.jpg",
"https://lh5.googleusercontent.com/-7qZeDtRKFKc/URquWZT1gOI/AAAAAAAAAbs/hqWgteyNXsg/s1024/Another%252520Rockaway%252520Sunset.jpg",
"https://lh3.googleusercontent.com/--L0Km39l5J8/URquXHGcdNI/AAAAAAAAAbs/3ZrSJNrSomQ/s1024/Antelope%252520Butte.jpg",
"https://lh6.googleusercontent.com/-8HO-4vIFnlw/URquZnsFgtI/AAAAAAAAAbs/WT8jViTF7vw/s1024/Antelope%252520Hallway.jpg",
"https://lh4.googleusercontent.com/-WIuWgVcU3Qw/URqubRVcj4I/AAAAAAAAAbs/YvbwgGjwdIQ/s1024/Antelope%252520Walls.jpg",
// more …
"https://lh4.googleusercontent.com/-e9NHZ5k5MSs/URqvMIBZjtI/AAAAAAAAAbs/1fV810rDNfQ/s1024/Yosemite%252520Tree.jpg",
};
/**
* This are PicasaWeb thumbnail URLs and could potentially change. Ideally the PicasaWeb API
* should be used to fetch the URLs.
*
* Credit to Romain Guy for the photos:
* http://www.curious-creature.org/
* https://plus.google.com/109538161516040592207/about
* http://www.flickr.com/photos/romainguy
*/
public final static String[] imageThumbUrls = new String[] {
"https://lh6.googleusercontent.com/-55osAWw3x0Q/URquUtcFr5I/AAAAAAAAAbs/rWlj1RUKrYI/s160-c/A%252520Photographer.jpg",
"https://lh4.googleusercontent.com/--dq8niRp7W4/URquVgmXvgI/AAAAAAAAAbs/-gnuLQfNnBA/s160-c/A%252520Song%252520of%252520Ice%252520and%252520Fire.jpg",
"https://lh5.googleusercontent.com/-7qZeDtRKFKc/URquWZT1gOI/AAAAAAAAAbs/hqWgteyNXsg/s160-c/Another%252520Rockaway%252520Sunset.jpg",
"https://lh3.googleusercontent.com/--L0Km39l5J8/URquXHGcdNI/AAAAAAAAAbs/3ZrSJNrSomQ/s160-c/Antelope%252520Butte.jpg",
"https://lh6.googleusercontent.com/-8HO-4vIFnlw/URquZnsFgtI/AAAAAAAAAbs/WT8jViTF7vw/s160-c/Antelope%252520Hallway.jpg",
"https://lh4.googleusercontent.com/-WIuWgVcU3Qw/URqubRVcj4I/AAAAAAAAAbs/YvbwgGjwdIQ/s160-c/Antelope%252520Walls.jpg",
// … more
"https://lh4.googleusercontent.com/-e9NHZ5k5MSs/URqvMIBZjtI/AAAAAAAAAbs/1fV810rDNfQ/s160-c/Yosemite%252520Tree.jpg",
};
}
주 ...에 대해 이야기하고 무엇 :이 코드는 내 설명이 충분히 명확하지 않은 경우 http://developer.android.com/training/displaying-bitmaps/index.html
임 죄송 주시기이 링크를 제공하는 샘플이었다 질문에 대한 후속 조치를 요청합니다 ... 감사합니다.
인텐 트 메모리 크기가 몇 비트인지 알아야 대신 이미지를 처리하고 엄지 손가락을로드하십시오. –