Usage of broadcast in Android studio

catalogue 1. Dynamic method: 2. Static registration broadcast 3. Send and receive custom broadcasts 4. Cross program receive broadcast There are two kinds of broadcasting, static broadcasting and dynamic broadcasting. 1. Dynamic method: Rewrite the broadcast receiver to accept the broadcast and operate according to the received broa ...

Posted by seco on Wed, 09 Mar 2022 08:00:07 +0100

Android MVVM architecture construction

Although MVVM architecture was also used in previous projects, I was not familiar with the whole MVVM architecture because I didn't build the overall framework myself, so I built and implemented the MVVM architecture myself this time. The components used by MVVM architecture include ViewModel, LiveData, ViewBinding/DataBinding, etc. these comp ...

Posted by impulse() on Tue, 08 Mar 2022 12:51:33 +0100

Hilt Test - Fragment trouble: this needs special treatment, starting a new stove, counterfeiting process, making empty birth, just for a Fragment.

๐Ÿšช 1. Fragment report Gradle Gradle - Module: def fragment_version = "1.3.1" implementation "androidx.fragment:fragment-ktx:$fragment_version" debugImplementation "androidx.fragment:fragment-testing:$fragment_version" ๐Ÿ˜“: You see, this is not Android test or test, but debug. We don't have it! ๐Ÿค—: haven't you? You have to mak ...

Posted by langer on Tue, 08 Mar 2022 05:33:34 +0100

Bitmap memory recycling mechanism

The official has also changed this knowledge point twice Bitmap can be said to be the most common memory consumer in Android. Many oom problems we encounter in the development process are caused by it. Google officials have also been iterating over its pixel memory management strategy. From Android 2.3.3 to 2.3-7.1 on the java heap, and back t ...

Posted by WBSKI on Tue, 08 Mar 2022 04:01:59 +0100

Android learning notes - bubble chat written by RecyclerView

statement The code part of this time refers to Guo Lin - the first line of code, which was written manually after learning the recyclerview chapter. . 9 drawing making . 9 the drawing material is made by myself with the drawing tool in the Windows attachment (i.e. I can't find the resource), and then imported into Android Studio for editing ...

Posted by scuzzo84 on Tue, 08 Mar 2022 01:07:39 +0100

An article takes you to the mystery of gradle from the perspective of source code

Hello, dear friends, Yien is seeing you again. Unlike the general introduction articles on the Internet, which only stay at the level of "how to use", this article understands gradle from the perspective of source code. Of course, if you haven't read my previous article "If you don't understand gradle after reading this ar ...

Posted by bhola on Sat, 05 Mar 2022 03:12:17 +0100

Android - Section 10 JSON explanation

1, Introduction to JSON JSON(JavaScript Object Notation) is a lightweight data exchange format. It is based on a subset of JavaScript, which is easy for people to write and read, and easy for machine parsing. JSON adopts a text format completely independent of the language, but it also uses habits similar to the C language family (inclu ...

Posted by getmizanur on Thu, 03 Mar 2022 20:26:56 +0100

Why does the setOnClickListener reference Activity of view not leak memory

Learning is done preface Q: an Activity implements onClickListener. At this time, a Button uses setOnClickListener(this) Why is there no memory leak? A: because the View reference object will be released when the Activity is destroyed, there will be no memory leakage. Q: can you make it more detailed? Answer: Yes, Well, the window wi ...

Posted by Dragoonus on Thu, 03 Mar 2022 17:44:06 +0100

uiautomator+cucumber to realize automatic test of mobile app

premise Due to the business requirements of the company, the automatic test should meet the following points: Cross application testingStrong readability of test casesThe test report is readableScreenshots of failed use cases are saved and reflected in the report Based on the above points, we chose uiautomator when selecting the automation t ...

Posted by ashley526 on Thu, 03 Mar 2022 16:33:40 +0100

Android - Section 9 network programming

1, Network access overview Let's explain and review. We learned Android's UI, various layouts and controls before. In fact, when we work in the future, this UI does not need us to design. A designer will design the UI for us, and then we will restore the UI in the form of code in xml file. For example, the following figure is the data c ...

Posted by stef686 on Wed, 02 Mar 2022 16:53:33 +0100