Afinal Framework Finalbitmap Use method

Source: Internet
Author: User

Afinal Introduction
Afinal is an Android-SQLite ORM and IOC framework. It also encapsulates the HTTP framework in Android, making it easier to use;
? With Finalbitmap, there is no need to consider the problem of Oom when the bitmap is loaded in Android and when the image loading position is misplaced when fast sliding.
? The purpose of afinal is to be concise and fast. The contract is larger than the configured way. Try to do everything in one line of code.
Currently Afinal has four main modules:
?
FINALDB module: The ORM Framework in Android, a line of code can be used for additional deletions and checks. Support one-to-many, many-to-one queries.

?
Finalactivity module: The IOC framework in Android, which is fully annotated to enable UI binding and event binding. No need for Findviewbyid and Setclicklistener.

?
Finalhttp module: Encapsulates HTTP data requests through httpclient, and supports AJAX-mode loading.

?
Finalbitmap module: When loading the bitmap through Finalbitmap,imageview, there is no need to consider the phenomenon of image dislocation when the Oom and the Android container quickly slide during the bitmap loading process. Finalbitmap can configure the number of thread preempted threads, cache size, cache path, load display animation, etc. Finalbitmap's memory management uses the LRU algorithm, Not using weak references (after android2.3, Google has not recommended the use of weak references, android2.3 after the forced recovery of soft and weak references, details of the official Android document), better management bitmap memory. Finalbitmap can customize the downloader to extend other protocols to display network pictures, such as FTP. You can also customize the bitmap display, play animations when ImageView display pictures, and so on (default is the gradient animation display).

The following permissions are required to use the Afinal rapid development Framework:

<uses-permission android:name= "Android.permission.INTERNET"/>
<uses-permission android:name= "Android.permission.WRITE_EXTERNAL_STORAGE"/>

? The first one is to access the network
? The second one is to visit sdcard
? Access to the network is required when requesting a network image or when HTTP data is requested, and access to SDcard is required for the picture cache.

First initialize the Finalbitmap
Finalbitmap bitmap=finalbitmap.create (context context);
Load Network pictures
Bitmap.display (Imageview,url)
ImageView---->imageview Picture control
URL-----------> Web image Address

The Bitmapdisplayconfig class mainly sets the size of the picture
The Simpledisplayer class is primarily used to monitor whether a picture is loaded and completed

To be perfected ~~~~~~~~~~~~

Afinal Framework Finalbitmap Use method

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.