Skip to main content

Posts

Showing posts from March 11, 2018

Picasso:A powerful image downloading and caching library for Android

Introduction Images add much-needed context and visual flair to Android applications. Picasso allows for hassle-free image loading in your application—often in one line of code! Picasso . get (). load ( "http://i.imgur.com/DvpvklR.png" ). into ( imageView ); Many common pitfalls of image loading on Android are handled automatically by Picasso: Handling  ImageView  recycling and download cancelation in an adapter. Complex image transformations with minimal memory use. Automatic memory and disk caching. Features ADAPTER DOWNLOADS Adapter re-use is automatically detected and the previous download canceled. @Override public void getView ( int position , View convertView , ViewGroup parent ) { SquaredImageView view = ( SquaredImageView ) convertView ; if ( view == null ) { view = new SquaredImageView ( context ); } String url = getItem ( position ); Picasso . get (). load ( url ). into ( view ); } IMAGE TRANSFORMATION...

An Introduction to JSOUP: Java HTML parser that makes sense of real-world HTML soup.

jsoup  is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. Using JSOUP one can fetch string and links from any website and show them in a listView or RecyclerView. jsoup implements the  WHATWG HTML  specification and parses HTML to the same DOM as modern browsers do. parse HTML from a URL, file, or string find and extract data, using DOM traversal or CSS selectors manipulate the HTML elements, attributes, and text clean user-submitted content against a safe white-list, to prevent XSS output tidy HTML jsoup is designed to deal with all varieties of HTML found in the wild; from pristine and validating, to invalid tag-soup; jsoup will create a sensible parse tree. Package Description org.jsoup Contains the main  Jsoup  class, which provides convenient static access to the jsoup functionality. org.jsoup.examples Co...