GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing bumptech.github.io — Glide v4 : Getting Started Glide v4 Fast and efficient image loading for Android - 中文版 - Edit this page
Getting StartedBasic UsageLoading images with Glide is easy and in many cases requires only a single line: Cancelling loads you no longer need is simple too: Although it’s good practice to clear loads you no longer need, you’re not required to do so. In fact, Glide will automatically clear the load and recycle any resources used by the load when the Activity or Fragment you pass in to Customizing requests.Glide offers a variety of options that can be applied to individual requests, including transformations, transitions, caching options etc. Default options can be applied directly on a request: Options can be shared across requests using the Glide’s API can be further extended to include custom options using Glide’s generated API for advanced use cases. ListView and RecyclerViewLoading images in a ListView or RecyclerView uses the same load line as if you were loading in to a single View. Glide handles View re-use and request cancellation automatically: You don’t need to null check your urls either, Glide will either clear out the view or set whatever placeholder Drawable or fallback Drawable you’ve specified if the url is null. Glide’s sole requirement is that any re-usable By calling Although the examples we’ve shown here are for RecyclerView, the same principles apply to ListView as well. Non-View TargetsIn addition to loading There are a few gotchas with using custom Background ThreadsLoading images on background threads is also straight forward using You can also start asynchronous loads on background threads the same way you would on a foreground thread if you don’t need the |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |