In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
How to understand the common open source framework of Android GitHub, in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Now the popular open source library on GitHub has greatly saved developers' time from zero. Many companies and individuals are opening up their own projects on GitHub. Today, let's sort out some very popular libraries in Android development, which we must master, so that we can find them quickly when we use them. The summary here is basically what we used in development, that is, some personal opinions. Only for reference, not authoritative.
I. Network Library
1. Retrofit
Retrofit is a network request library developed by Square, and it is also one of the current HttpClient libraries of Android. More and more companies begin to use this request library and can combine it with RxJava. As introduced on the official website, Retrofit is a type-safe network framework based on HTTP protocol and serves Android and Java languages.
GitHub address: Retrofit GitHub address
2. Okhttp
Similarly, okhttp is also a network request library developed by Square, a network framework based on HTTP and HTTP2.0 protocols, serving Java and Android clients. Okhttp ranks second in the android subtitle of GitHub with 21K stars, and many companies are using it. Since Retrofit 2.0, Retrofit focuses on encapsulating interfaces to complete business requirements, and okhttp focuses on efficient and secure network requests.
3. Volley
Google's Andorid development team is also aware of the need to simplify the communication operation of HTTP, so they launched a new network communication framework-Volley,Volley with significant adjustments in performance at the Google IWeiO Conference in 2013. it is designed to be suitable for network operations with small amount of data but frequent communication, which will perform badly for network operations with large amount of data.
GitHub address: volley GitHub address
4. Fast Android Networking
Fast Android Networking based on OkHttp can make network communication concise (without boilerplate code), making it easy for developers to write communication code. It is a lightweight fast network communication library. Try it. You'll love it.
GitHub address: FastAndroidNetworking GitHub address
2. Picture loading library
In Android devices, fast and efficient display of pictures is extremely important, in the past a long time, we have encountered a lot of problems in how to efficiently store images, such as images are too large, but the memory is relatively small, but more and more excellent open source framework to solve our problems, let's take a look at these excellent open source frameworks.
1. Glide
At the Google developer Forum in Thailand, Google introduced an image loading framework called glide by bumptech, a library that is widely used in Google open source projects, including the official App unveiled at the 2014 Google iMaple O conference.
GitHub address: Glide GitHub address
2. Fresco
A solution for managing image memory is one of the current large image loading frameworks. The origin of facebook has proved that it is not a repetitive manufacturing wheel. It has unique characteristics in managing image memory and progressive loading and loading gif.
GitHub address: Fresco GitHub address
3. Picasso
Very powerful picture download, cache framework, picasso puts more emphasis on picture download, more importantly, this is also the work of the square team, presumably mentioned the square team, we are still very relieved to use the things it produced.
GitHub address: picasso GitHub address
4. Android-Universal-Image-Loader
See this, I think experienced Android developers will be very familiar with, once the king of image loading, 15.4k stars is enough to prove its hot, and glide is different from UIL provides a large number of configuration, image loading status callback, load animation, etc., as well as provide a mobile image loading framework cache ideas, three-level cache strategy.
GitHub address: UIL GitHub address
5. PhotoView
An ImageView display framework, support for zooming, response gestures, located in the fifth place on the picture list, PhotoView and the above is different is the picture display function, can achieve similar Wechat profile picture magnification function, and a lot of App pictures show response gesture pressing style is realistic, here PhotoView will be easy to achieve.
GitHub address: PhotoView GitHub address
6. CircleImageView
Rounded corners ImageView must be too common in our App. Maybe we can have countless ways to display rounded corners, but CircleImageView is definitely our priority in development. If you don't know CircleImageView, then you need to experience its power in dealing with rounded corners. I'm sure you'll think it's too late to meet CircleImageView. Note that this is not a picture loading library. Just sort it out and put it here.
GitHub address: CircleImageView GitHub address
About the picture loading library we will introduce these 6, you can choose to use according to your own specific situation.
III. UI
1. Material-dialogs
Is a custom View framework, if many of you are new to a custom View and are a little unfamiliar with the use of Dialog, then you can improve your ability to use Dilaog by using material-dialogs.
GitHub address: material-dialogs GitHub address
2. Flexbox-layout
It is a flexible layout. As a substitute for LinearLayout and RelativeLayout, FlexboxLayout is worth trying to use in project development. After all, it is produced by Google.
GitHub address: flexbox-layout GitHub address
3. AndroidSwipeLayout
Very powerful sliding layout, sliding deletion is a common requirement in our app, and sliding requirements for product details are also often encountered in actual development. AndroidSwipeLayout has 8300 stars on GitHub, which proves to be worth using.
GitHub address: AndroidSwipeLayout GitHub address
4. BaseRecyclerViewAdapterHelper
Powerful general-purpose RecyclerView adapter, in the GitHub Android adapter ranking *.
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 frame that makes view sliding more visually available on GitHub with 12 sliding effects that can be used to enhance the sliding experience of App.
GitHub address: Android-ObservableScrollView GitHub address
7. AppIntro
A framework that provides rapid production of welcome pages. In domestic App development, the welcome page of App developed by ViewPager is already a standard requirement, but AppIntro is also definitely worth seeing.
GitHub address: AppIntro GitHub address
8. ViewPagerIndicator
A ViewPager-based page indicator open source framework, the author is Android god JakeWharton, but has not been updated for a long time, you can refer to and use.
GitHub address: ViewPagerIndicator GitHub address
All right, there are so many libraries related to UI. Later, those that are useful will be added to make it easy to consult.
IV. Animation
1. Lottie-android
Animation framework ranking *, a framework that can quickly display the animation done by the Adobe Afeter Effect (AE) tool on the Android side. It is convenient to use json text 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 generate the animation effect into a json file. This json file can be parsed by LottieAnimationView and generate gorgeous animation effects, and it also supports cross-platform.
GitHub address: lottie-android GitHub address
2. Material-Animations
An animation framework that provides the transition ability of scene conversion. Unlike lottie-android, Material-Animations provides the animation effect of scene switching.
GitHub address: Material-Animations GitHub address
3. AndroidViewAnimations
A lovely animation set of animation framework, after the lottie-android and Material-Animations animation framework overlord ranked third, it can be seen is also very powerful.
GitHub address: AndoridViewAnimations GitHub address
4. Recyclerview-animators
Recyclerview has been around for a long time to provide a framework for extended animation for recyclerview, and if you're still using ListView, you're getting old.
GitHub address: recyclerview-animators GitHub address
V. json parsing framework
1. Fastjson
A framework based on json parsing and generation is produced by Ali, which ensures the quality of the code and is widely used in network requests, so it is worth trying.
GitHub address: fastjson GitHub address
2. GSON
A library that provides serialization / deserialization of Java objects to JSON format.
GitHub address: gson GitHub address
VI. Memory leak detection
1. Leakcanary
A memory detection framework for Java and Andorid clients, convenient and concise is the characteristics of leakcanary *, only need to be integrated in the apllication of the application, you can directly use it, 15.9k stars is enough to show that it is powerful, the most important thing is that it is also the work of the square team, on this one, needless to say, I believe we all understand.
GitHub address: leakcanary GitHub address
7. Page routing
1. ARouter
A routing framework for providing services and page redirection, produced by Ali, which provides capabilities such as mapping from external URL to internal pages, cross-module page redirection (modularization essential, page decoupling), intercepting the jump process, etc., is definitely an enterprise-level development framework.
GitHub address: ARouter GitHub address
VIII. Database framework
1. Realm-java
Realm is a database framework specially built for mobile, which is faster than ordinary databases and beats greenDAO.
GitHub address: Realm GitHub address
2. GreenDAO
GreenDAO is an efficient and fast SQLite database, the number of star is comparable to Realm, developed and maintained by the greenrobot team, this team also has a powerful framework is EventBus.
GitHub address: greenDAO GitHub address
IX. Async
1. RxJava
RxJava is ReactiveExtensions's Java VM implementation: for combining asynchronous and event-based libraries by using observable sequences, it extends the Observer pattern to support data / event sequences and adds operators that allow you to declare combined sequences while extracting hiding from 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, which ranks second in the list of communication frameworks, only after EventBus, the difference between the two is that EventBus is used to replace the tedious 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 groups write Android functions, asynchronous and invalid applications that require Android SDK version 9 or higher, is the official product of Google.
GitHub address: Agera GitHub address
4. RxBinding
A framework that provides event response capabilities of UI components. Through RxBinding, you can understand the joy of responsive programming and make the event flow of the project clearer.
GitHub address: RxBinding GitHub address
Event message
1. EventBus
The inter-event communication framework stars * * is used in Activities, Fragments, Threads and Services of large-scale projects. Although EventBus has some limitations in passing events to uncreated components, it is only suitable for passing messages between living components, but it still does not hinder its use in various large-scale project scenarios.
GitHub address: EventBus GitHub address
Eleventh, chart
1. MPAndroidChart
MPAndroidChart is a chart framework known for its speed, simplicity, and power, supporting lines, pie shapes, bubbles and candlesticks, as well as zooming, dragging and animating.
GitHub address: MPAndroidChart GitHub address
Generate template code
1. Butterknife
Use annotations to generate template code, bind view to methods and parameters, and cooperate with the ButterKnife plug-in provided by Android Studio to help developers save frequent findViewById troubles. * ButterKnife also provides onclick binding and string initialization. Beginners can check ButterKnife and ButterKnife for further study. The author is JakeWharton, one of the team members of the famous square.
GitHub address: butterknife GitHub address
XIII. Other
1.Device Year Class
Device Year Class will tell the current device's memory, CPU core and clock frequency in which year the product line is high-equipped. It allows developers to make app behave differently according to the hardware performance of the phone.
GitHub address: DeviceYearClass GitHub address
2.Network Connection Class
Network Connection Class can query the network connection quality of the current user. It will be divided into several "Connection Classes" (connection classification) according to the quality of the network to make development easier. This library monitors app's existing network traffic and notifies users when the communication speed changes. Developers can adjust the behavior of app through network connections (such as using lower quality audio and video, stopping using input prompts, etc.).
GitHub address: NetworkConnection GitHub address
3.Android Debug Database
Android Debug Database is a powerful library for debugging Android databases and sharing items (shared preference). It is an easy-to-use tool for browsing databases and sharing items in a browser.
GitHub address: DebugDatabase GitHub address
4.LeakCanary
LeakCanary is a library for detecting memory leaks on Android and Java.
GitHub address: Leakcanary GitHub address
5.Dagger
Fast dependency injection libraries for Android and java. It simplifies reading and writing to shared instances, simplifies complex dependency settings, and makes unit testing and integration testing easier.
GitHub address: Dagger GitHub address
6.Realm
Simple storage, high-speed query, saving a lot of development time. Realm Mobile Database is an alternative to SQLite, an ORM solution framework.
GitHub address: Realm GitHub address
7.Timber
A Logger with a small, extensible API is available on top of Android's original Log class.
GitHub address: Timber GitHub address
8.Hugo
Automatically log method calls for your debug build through tagging triggers. As a programmer, you often need to add logging functions to print function calls, as well as parameters and return values, and take the time to execute. It's not a problem. We all do it. Is it just possible to make it easier? Just add @ DebugLog to the header of the function and you can get all the information we just talked about.
GitHub address: Hugo GitHub address
9.Android GPU Image
Provides a library of efficient OpenGL-based filters on Android.
GitHub address: GPU Image GitHub address
10.ExoPlayer
ExoPlayer is an application-level Android media player. It provides API support for playing audio locally or on the network. ExoPlayer supports features that are not supported by the current Android media player API, such as DASH and Smooth Streaming adaptive playbacks (automatic real-time adjustment of playback resolution based on bandwidth).
GitHub address: ExoPlayer GitHub address
This is the answer to the question on how to understand the common open source framework of Android GitHub. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.