Android framework, which framework is more stable and easy to use, Afinal or Xutils

Xutils is developed based on afinal, but its stability is much improved than that of afinal,

  • xUtils contains many useful android tools.

  • xUtils was originally derived from the Afinal framework and has undergone a lot of refactoring, making xUtils support large file uploads, more comprehensive http request protocol support (10 predicates), more flexible ORM, more event annotation support and not affected by confusion ...

  • xUitls minimum compatible with android 2.2 (api level 8)

At present, xUtils mainly has four modules:

  • DbUtils module:

Orm framework in android, one line of code can add, delete, modify and check;

Support transactions, closed by default;

You can customize table names, column names, foreign keys, unique constraints, NOT NULL constraints, CHECK constraints, etc. through annotations (please annotate the table name and column name when you need to obfuscate);

Support binding foreign keys, when saving entities, foreign key-related entities are automatically saved or updated;

Automatically load foreign key related entities, support delayed loading;

Support chain expression query, more intuitive query semantics, refer to the following introduction or examples in the sample.

  • ViewUtils module:

The ioc framework in android can be fully annotated for UI, resource and event binding;

The new event binding method can still work normally after obfuscation with obfuscation tools;

Currently, 20 commonly used event bindings are supported, see the ViewCommonEventListener class and the package com.lidroid.xutils.view.annotation.event.

  • HttpUtils module:

Support synchronous and asynchronous requests;

Support large file upload, uploading large files will not oom;

Support GET, POST, PUT, MOVE, COPY, DELETE, HEAD, OPTIONS, TRACE, CONNECT requests;

Download supports 301/302 redirection, supports setting whether to rename downloaded files according to Content-Disposition;

Requests that return text content (only GET requests are enabled by default) support caching, and can set the default expiration time and the expiration time for the current request.

  • BitmapUtils module:

When loading the bitmap, there is no need to consider the phenomenon such as the oom that occurs during the bitmap loading process and the image misalignment that occurs when the android container slides quickly;

Support loading network pictures and local pictures;

Memory management uses lru algorithm to better manage bitmap memory;

Configurable thread loading thread number, cache size, cache path, loading display animation, etc...


Hi!
XUtils framework is better.
XUtils is a framework with relatively active functions and relatively complete functions on git at present. It is developed based on afinal, and its stability is much improved than that of afinal.
xUtils contains many useful android tools.
xUtils was originally derived from the Afinal framework and has undergone a lot of refactoring, making xUtils support large file uploads, more comprehensive http request protocol support (10 predicates), more flexible ORM, more event annotation support and not affected by confusion ...
xUitls is compatible with minimum android 2.2 (api level 8)!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326530810&siteId=291194637