Android andbase Application Development Framework

Source: Internet
Author: User
Tags soap throwable

Run Andbasedemo requires that the Andbase library in the file be add into the demo.
The 1.andbase contains a large number of common tools for development.
such as network download, multi-threading and thread pool management, database ORM, image cache management, image file download upload, HTTP request tool, SOAP tool class, asynchronous task, Common tools Class (string, date, file processing, image processing tool class, etc.), Can make your application in team development to reduce redundant code, greatly improve the maintenance of code and development efficiency, can be good to avoid the development negligence caused by common mistakes.
The 2.andbase encapsulates a large number of commonly used controls.
such as list paging, grid paging, dropdown refresh, Progress box, picture Carousel, table, multi-threaded downloader, sidebar, image upload, wheel selection, chart, tab swipe, calendar selector, etc.
3. Powerful abactivity, you have no reason not to inherit it.
Inherit it you can get a simple and powerful set of action Bar, as well as a series of simple calls, such as popup box, prompt box, progress box, Deputy action Bar and so on.
4. Provide more efficient image cache management strategy, so that memory is greatly saved, utilization rate increases, efficiency increases.
The program to manage a large number of image resources, Andbase provides a simple method, a few steps to complete the download and display, and support scaling, cropping, caching features, oom is not there.
5. Encapsulates a large number of common tool classes.
including date, character, file, picture, math, view universal Adaptation tool class and other processing functions, many and all.
6. Using Andbase to reduce the use of handler a lot, and using a callback function, the code is cleaner.
Handler will generate a lot of code, and not good maintenance, andbase to handler encapsulation, you will find that andbase Basic code will not have a large number of handler judgment statement.
7. Simple and lightweight ORM framework (supports one/many-to-many association operations) for annotating automatic table-building.
Write SQL, build the table, the workload is big, andbase provide more fool asynchronous adding and Deleting tool class, database in the internal card and external card can be.
8. Asynchronous request HTTP framework, network request standardization, support file upload download, get,post, progress display.
A tool class that contains asynchronous and HTTP requests, a SOAP request Tool class, is simple and practical.

Left Slide Login Register tab frame Feature List

SOURCE snippet:

 Public classNetworkweb {PrivateAbhttputil Mabhttputil =NULL; PrivateContext Mcontext =NULL;  PublicNetworkweb (Context context) {//Creating an HTTP tool classMcontext =context; Mabhttputil=abhttputil.getinstance (context); }     /** * Create A new instance of Settingweb. */     Public StaticNetworkweb newinstance (context context) {Networkweb Web=NewNetworkweb (context); returnweb; }     /** * Call the requested template * @param param1 parameter 1 * @param param2 parameter 2 * @param Abhttplistener requested listener*/     Public voidtesthttpget (String param1,string param2,final abhttplistener abhttplistener) {//a URL addressString urlstring ="http://www.amsoft.cn/rss.php"; Mabhttputil.Get(URLString,NewAbstringhttpresponselistener () {@Override Public voidOnsuccess (intStatusCode, String content) {                //Pass the result backabhttplistener.onsuccess (content); } @Override Public voidOnStart () {} @Override Public voidonfinish () {} @Override Public voidOnFailure (intStatusCode, String content, throwable error) {                //Pass the failure error message backabhttplistener.onfailure (content);    }                     }); }         /** * Call a list request * @param abrequestparams parameter list * @param listener requested by Abhttplistener*/     Public voidFindloglist (abrequestparamsparams, final Abhttplistener Abhttplistener) {Final String result= Abfileutil.readassetsbyname (Mcontext,"Article_list.json","UTF-8"); //a URL addressString urlstring ="http://www.amsoft.cn/rss.php?"; Mabhttputil.Get(URLString,params,NewAbstringhttpresponselistener () {@Override Public voidOnsuccess (intStatusCode, String content) {                Try {                    //Analog DataContent =result; Abresult result=NewAbresult (content); if(Result.getresultcode () >0) {                        //SuccessArticlelistresult Marticlelistresult = (articlelistresult) Abjsonutil.fromjson (Content,articlelistresult.class); List<article> articlelist =Marticlelistresult.getitems (); //Pass the result backabhttplistener.onsuccess (articlelist); } Else {                        //Pass the error message backabhttplistener.onfailure (Result.getresultmessage ()); }                } Catch(Exception e) {e.printstacktrace ();                Abhttplistener.onfailure (E.getmessage ()); }} @Override Public voidOnStart () {//the state of the beginning passes back} @Override Public voidonfinish () {//the completed state is passed back} @Override Public voidOnFailure (intStatusCode, String content, throwable error) {                //Pass the failure error message backabhttplistener.onfailure (content);     }           }); }}

Code: here

Android andbase Application Development Framework

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.