The popular open source libraries on GitHub now greatly save developers' time from zero development. Many companies and individuals open source their own projects on GitHub. Today we will sort out some very popular libraries in Android development, which we must master, so that we can quickly find them when we need them. The summary here is basically what I use in my own development, that is, some personal insights, for reference only, not authoritative 1. Network Library 1. Retrofit Retrofit is a network request library developed by Square. It is also one of the most popular HttpClient libraries for Android. More and more companies are starting to use this request library, and it can be combined with RxJava. As introduced on the official website, Retrofit is a type-safe network framework based on the HTTP protocol, serving Android and Java language. GitHub address: Retrofit GitHub address 2. okhttp Similarly, okhttp is also a network request library developed by Square. It is a network framework based on HTTP and HTTP2.0 protocols, serving Java and Android clients. Okhttp ranks second in the android subtitle in GitHub with 21K stars. Many companies are using it. Starting from Retrofit 2.0, the okhttp framework is built in. Retrofit focuses on encapsulating interfaces to meet business needs, and okhttp focuses on efficient and secure network requests. GitHub address: okhttp GitHub address 3. Volley Google's Android development team also realized the need to simplify HTTP communication operations, so they launched a new network communication framework, Volley, at the 2013 Google I/O conference. Volley has made significant adjustments in performance. It is designed to be suitable for network operations with small data volumes but frequent communications. It will perform poorly for network operations with large data volumes. GitHub address: volley GitHub address For the network library, we will introduce the three main ones used above. 2. Image loading library On Android devices, it is extremely important to display images quickly and efficiently. In the past, we have encountered many problems in how to store images efficiently, such as the image is too large, but the memory is relatively small. However, more and more excellent open source frameworks have been used to solve our problems in this regard. Next, let's take a look at these excellent open source frameworks. 1. glide At the Google Developer Forum held in Thailand, Google introduced us to an image loading framework called Glide, authored by bumptech. This library is widely used in Google open source projects, including the official App released at the 2014 Google I/O conference. GitHub address: Glide GitHub address 2. fresco A solution for managing image memory. It is one of the largest image loading frameworks at present. Its origin from Facebook proves that it is not a repetitive manufacturing wheel. It has unique features in managing image memory, progressive loading, and loading GIF. GitHub address: Fresco GitHub address 3. Picasso A very powerful image download and cache framework. Picasso emphasizes image download. More importantly, it is also the work of the Square team. I think when we mention the Square team, we are still very confident in using its products. GitHub address: picasso GitHub address 4. Android-Universal-Image-Loader Seeing this, I believe that experienced Android developers will be very familiar with it. It was once the king of image loading. 15.4k stars are enough to prove its popularity. Unlike Glide, UIL provides a lot of configuration methods, callbacks for image loading status, loading animations, etc., as well as caching ideas for mobile image loading frameworks, three-level caching strategies, etc. GitHub address: UIL GitHub address 5. PhotoView An ImageView display framework that supports zooming and responding to gestures. It ranks fifth in the image rankings. The difference between PhotoView and the above is the image display function. It can realize the zoom function similar to WeChat avatar. In addition, many Apps' image display responds to gestures and presses. Here, PhotoView can easily realize GitHub address: PhotoView GitHub address 6. CircleImageView Rounded corner ImageView, this must be too common in our App. Maybe we can have countless ways to display rounded corner images, but CircleImageView is definitely the one we need to give priority to when developing. If you don’t know CircleImageView yet, then you need to experience its power in processing rounded corner images as soon as possible. I believe you will definitely feel that you have met CircleImageView too late. It should be noted that this is not an image loading library, so it is temporarily classified here. GitHub address: CircleImageView GitHub address We will introduce these 6 image loading libraries. You can choose to use them according to your specific situation. 3. UI 1. Material-dialogs It is a custom View framework. If you are still a newbie in custom View and are still a little unfamiliar with Dialog, then you can improve your Dilaog usage ability by using material-dialogs. GitHub address: material-dialogs GitHub address 2. flexbox-layout FlexboxLayout is a flexible and retractable layout. As a replacement for LinearLayout and RelativeLayout, it is worth trying in project development. After all, it is a product of Google. GitHub address: flexbox-layout GitHub address 3. AndroidSwipeLayout Very powerful sliding layout. Slide to delete is a common requirement in our app. We also often encounter the requirement of sliding up and down for product details in actual development. AndroidSwipeLayout has 8,300 stars on GitHub, proving that it is still worth using. GitHub address: AndroidSwipeLayout GitHub address 4. BaseRecyclerViewAdapterHelper A powerful universal RecyclerView adapter, ranked on GitHub Android adapter leaderboard*** GitHub address: BaseRecyclerViewAdapterHelper GitHub address 5. MaterialDrawer Strong material style drawer frame, very flexible and easy to use GitHub address: MaterialDrawer GitHub address 6. Android-ObservableScrollView A sliding framework that makes the view sliding more visually appealing. It provides 12 sliding effects on GitHub, which can be used to enhance the sliding experience of the App. GitHub address: Android-ObservableScrollView GitHub address 7. AppIntro A framework that provides a quick way to create a welcome page. In domestic App development, ViewPager is already a standard requirement for developing App welcome pages, but AppIntro is definitely worth a look. GitHub address: AppIntro GitHub address 8. ViewPagerIndicator An open source framework for page indicators based on ViewPager. The author is Android master JakeWharton. It has not been updated for a long time. You can refer to it. GitHub address: ViewPagerIndicator GitHub address Well, that's all for UI related libraries. I will add them if I find them useful in the future for easy reference. 4. Animation 1. lottie-android The first in the animation framework rankings, a framework that can quickly display the animation made by Adobe Afeter Effect (AE) tool on the Android side. Its greatest convenience is to use json files to quickly achieve animation effects. This json file is also made by the AE tool provided by Adobe. Install a Bodymovin plug-in in AE, and use this plug-in to finally generate a json file for the animation effect. This json file can be parsed by LottieAnimationView and generate gorgeous animation effects. It also supports cross-platform GitHub address: lottie-android GitHub address 2. Material-Animations An animation framework that provides scene transition capabilities. Unlike lottie-android, Material-Animations provides scene switching animation effects. GitHub address: Material-Animations GitHub address 3. AndroidViewAnimations An animation framework that provides a set of cute animations. It ranks third after lottie-android and Material-Animations, two animation framework overlords. It can be seen that it is also very powerful. GitHub address: AndroidViewAnimations GitHub address 4. recyclerview-animators Provides a framework for expansion animation for recyclerview. Recyclerview has been launched for a long time. If you are still using ListView, it means you are old. GitHub address: recyclerview-animators GitHub address 5. JSON parsing framework 1. fastjson A framework based on json parsing and generation, produced by Alibaba, which ensures the quality of the code. It is used more in network requests and is worth trying. GitHub address: fastjson GitHub address 6. Memory Leak Detection 1. leakcanary A memory detection framework that serves Java and Android clients. Convenience and simplicity are the most important features of LeakCanary. You only need to integrate it in the application's apllication to use it directly. 15.9k stars are enough to show how powerful it is. The most important thing is that it is also the work of the square team. I believe everyone understands this point without saying it. GitHub address: leakcanary GitHub address 7. Page Routing 1. ARouter A routing framework that provides services and page jumps, produced by Alibaba. The framework provides: mapping from external URLs to internal pages, cross-module page jumps (modularization is essential, page decoupling), interception of jump processes, etc. It is definitely an enterprise-level development framework GitHub address: ARouter GitHub address 8. Database Framework 1. realm-java Realm is a database framework specially designed for mobile terminals. It is faster than ordinary databases and beats greenDAO. GitHub address: Realm GitHub address 2. greenDAO greenDAO is an efficient and fast SQLite database with the same number of stars as Realm. It is developed and maintained by the greenrobot team. This team also has a very powerful framework called EventBus. GitHub address: greenDAO GitHub address 9. Asynchronous 1. RxJava RxJava is a Java VM implementation of ReactiveExtensions: a library for composing asynchronous and event-based programs by using observable sequences, which extends the observer pattern to support sequences of data/events and adds operators that allow you to compose sequences declaratively while abstracting away concerns about low-level threading, synchronization, thread safety, and concurrent data structures. GitHub address: RxJava GitHub address 2. RxAndroid An asynchronous communication framework between Android client components. It ranks second in the communication framework rankings, only after EventBus. The difference between the two is that EventBus is used to replace the cumbersome Interface between components, while RxAndroid is used to replace AnsyTask. The two do not conflict. GitHub address: RxAndroid GitHub address 3. agera Agera is a set of classes and interfaces that can help write functional, asynchronous and invalid applications for Android. It requires Android SDK version 9 or higher and is an official product of Google. GitHub address: Agera GitHub address 4. RxBinding A framework that provides UI component event response capabilities. Through RxBinding, you can understand the joy of responsive programming and make the event flow of the project clearer. GitHub address: RxBinding GitHub address 10. Event Message 1. EventBus Stars ***, an event communication framework, has usage scenarios in Activities, Fragments, Threads, and Services of large projects. Although EventBus has some limitations in passing events to uncreated components and is only suitable for passing messages between living components, it still does not prevent it from being used in various large project scenarios. GitHub address: EventBus GitHub address 11. Charts 1. MPAndroidChart MPAndroidChart is a chart framework that is fast, simple and powerful. It supports line, pie, bubble and candlestick charts, as well as zooming, dragging and animation. GitHub address: MPAndroidChart GitHub address 12. Generate template code 1. butterknife Use annotations to generate template code, bind view to methods and parameters, and use the ButterKnife plug-in provided by Android Studio to help developers avoid the trouble of frequent findViewById. The latest ButterKnife also provides onclick binding and string initialization. Beginners can refer to ButterKnife and ButterKnife for further study. The author is JakeWharton, a member of the famous square team. GitHub address: butterknife GitHub address Today's summary ends here, and will be updated later. |
<<: Rich text editor implemented using UITableView in iOS
>>: Use CocoaPods to print and receive messages for WeChat integrated SDK
Nebula Science Discover the beauty of life throug...
[[398193]] Without further ado, let's get str...
SEO promotion is divided into on-site and off-sit...
In 2024, the world's attention will once agai...
Audit expert: Zhang Yufeng PhD/Associate Research...
Comprehensively understand domestic financial sup...
In early 2023, Chat GPT seemed to have set off a ...
01 Classification by traffic rating The editor di...
For most marketers, screen swiping is something t...
Whether it is a user product or a commercial prod...
The May Day is just over half a month away. Accord...
In the process of dividing up channel resources a...
Since those born after 1995 began to become the t...
Above the quiet lake, a bird is wandering in the ...