Android Image Browser Demo

Source: Internet
Author: User

First, this demo will gradually improve




One of the 2nd pictures is to move a line effect.


Here is the principle of implementation:

Using fragmentactivity+ multiple viewpage+fragment,

The picture resource is Baidu's,

Each fragment display up to 2 pictures, if not enough 2 hidden redundant, in the resolution of the picture data, calculate each fragment should display the picture

Image download tool directly using Universal-image-loader

Note the use of the Baidu API to obtain resources, if used conn = (httpurlconnection) url.openconnection ();

Need to add Conn.setrequestproperty ("User-agent", "mozilla/4.0" (compatible; MSIE 5.0; Windows NT; Digext) ");

If using httpclient httpclient = new Defaulthttpclient (); No need to add

The reasons are as follows:

The user agent Chinese name is called "UA", which is a special string header that allows the server to identify the operating system and version, CPU type, browser and version, browser rendering engine, browser language, browser plugin, etc. used by the client.
Some websites often judge the UA to send different pages to different operating systems, different browsers, which may cause some pages to not display properly in a browser, but can bypass detection by disguising the UA.



http://download.csdn.net/detail/a56573016613/8015263



Android Image Browser Demo

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.