ایجاد گالری کاملا آنلاین
سلام دوستان
من برای قسمتی از برنامم یک گالری تصویر کاملا آنلاین و به کمک GridView ایجاد کردم چیزی شبیه به "عکس کده" تصاویرم آدرسشون را به صورت آنلاین میگیره و نشون میده اما وحشتناک کنده حتی داخل thread هم گذاشتم و فایده ای نداشت.
کسی پیشنهاد یا راه حلی داره؟ می خوام مثل برنامه عکس کده توی بازار باشه اگه تونستید ببینیدش این برنامه هیچ thumbnail هم دانلود نمیکنه همه چی آنلاین رندر میشه اگه بتونیم همچین کاریو پیش ببریم به درد هممون میخوره.
ممنون
































یک مقایسه خوبی که میتونین در زیر یا این لینک و این لینک مشاهده کنید.
Picasso:
Picasso is powerful image downloading and caching library for Android. It allows for hassle-free image loading often in a single line of code. Many common pitfalls of image loading on Android are handled automatically by Picasso. Some of its features are handling ImageView recycling and download cancellation in an adapter, complex image transformations with minimal memory use, automatic memory and disk caching.
Pros:
- Efficient library with very little size (just around 85 KB).
- Very easy to use, usually with just a single line of code.
- Memory optimized, rarely causes any crashes or heap errors.
- Easy image manipulation and transformations.
Cons:
- Little documentation available, samples not quite user friendly either.
- Uses http headers for caching of images, so provides very less control (using OkHttp makes caching a bit better).
- Not very customizable.
Universal Image Loader:
Universal Image Loader (UIL) aims to provide a reusable instrument for asynchronous image loading, caching and displaying. It is originally based on Fedor Vlasov’s project “LazyList” although vastly refactored and improved. Some of its features are multithreaded image loading, wide tuning ImageLoader’s configuration, image caching in memory and/or on device’s file system, widget support and more.
Pros:
- Highly customizable, provides lots of configuration options.
- Provides good control over the image loading and caching process.
- Detailed documentation available (although bit outdated!) with lot of good samples.
Cons:
- Not very memory optimized, causes heap errors often. Precise configuration can make optimization better.
- ImageLoader class automatically manipulates images to save memory. Doesn’t provides manual transformation features.
- Bit bulky with about 150 KB of size.
Conclusion:
Both of these libraries have been around for long and have reached good stability and maturity. In general, Picasso is good for small projects where you just need to load images and not worry about the underlying process. Universal Image Loader on the other hand is good for medium to big projects. It is highly customizable and provides lot of control. Although It wants you to know the underlying process in order to work properly. If you are beginner, I would stay stick with Picasso Library. Only move to UIL if you need more control and can handle occasional memory errors.
پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .