Android develops TabLayout and Fragment to achieve tabbed effect

Android develops TabLayout and Fragment to achieve tabbed effect Use TabLayout and Fragment to realize the function of tabs First on the renderings Write the interface first. Main activity.xml code vertical linear layout, two controls, with tabs above and content below <android.support.design.widget.TabLayout ...

Posted by nafarius1357 on Fri, 03 Apr 2020 13:33:33 -0700

AOP object oriented section programming: Taobao Jingdong network processing

AspectJ: a facet oriented framework 1.1 download: http://www.eclipse.org/downloads/download.php?file=/tools/aspectj/aspectj-1.8.13.jar 1.2 direct installation 1.3 create a new application and add configuration in build.gradle: copy the complete code here apply plugin: 'com.android.application' import org.aspectj.bridge.IMes ...

Posted by fodder on Thu, 02 Apr 2020 16:40:18 -0700

Simple use of memcached java client

Simple use of memcached java client Start Memcached server ./memcached -d -m10 -u root -l 192.168.1.106 -p 2222 -c 256 -P /tmp/memcached.pid -The d option is to start a Daemons -m is the amount of memory allocated to Memcache, in MB, here is 10MB -u is the user running Memcache, here is r oot -l is the IP address ...

Posted by parkej60 on Wed, 01 Apr 2020 10:24:20 -0700

Imitated singing bar UI effect

I want to open my voice and sing in the past few days. I found that the interaction effect in the app is very interesting. I suddenly want to write it out (maybe this is instinct) On the left is the local effect, and on the second is the singing bar effect Write code here Picture description here Picture descriptio ...

Posted by monkeyj on Tue, 31 Mar 2020 21:05:40 -0700

RecyclerView sets two listening postures

Set listening method 1 Usage method Set listening method 2 Usage method Set listening method 1 An Interface is defined in the Adapter; Keep an interface object in the Adapter; Set the interface object through the set and get methods of adapter; Set itemView and view clickListener in the onBindViewHolder metho ...

Posted by suncore on Sun, 29 Mar 2020 09:47:42 -0700

A method for public tools to monitor the end of Activity life cycle and automatically recycle

I've seen Glide's source code before, but the code package of Glide is strict and cannot be solved. There is a business scenario that may lead to memory leakage. I mentioned this method, but it felt a little complicated, so I didn't do it. In the afternoon, I spent a little time to sort out the following ideas again, and found ...

Posted by discosuperfly on Fri, 20 Mar 2020 10:26:32 -0700

Solr implements the LIKE query function similar to MySQL

Recently, we have encountered the need for keyword query on large text. The effect to be achieved is that when a user enters a word or a word, all the contents containing the word or a word should be searched. It's the same as MySQL's LIKE query. In this scenario, the first thing I think about is to directly use MySQL storage, and then query, w ...

Posted by idnoble on Tue, 17 Mar 2020 08:19:00 -0700

Component schema ViewModel

Component schema ViewModel 1.What? 2. Usage 1. Create the ViewModel to be saved 2. Create a provider and obtain the ViewModel instance saved in the ViewModelStore through the provider 3.ViewModel 1. ViewModel associated with application 4.ViewModelProvider Constructor Factory Get ViewModel instanc ...

Posted by kenle on Sun, 15 Mar 2020 01:09:33 -0700

Detailed analysis of Lifecycle

Lifecycle source code analysis Catalogue introduction 01. What is the role of lifecycle 02. Simple use of lifecycle 03. Usage scenarios of lifecycle 04. How to realize life cycle awareness 05. How annotation methods are called 06.addObserver call analysis 07. Sort out and summarize the knowledge po ...

Posted by wangsc66 on Sun, 08 Mar 2020 19:37:25 -0700

What is Time Slicing?

according to W3C performance team More than 50 ms is a long task. Pictures from Using RAIL model to evaluate performance According to the figure above, when the delay exceeds 100ms, the user will notice a slight delay. So to avoid this situation, we can use two schemes, one is Web Worker, the other is Time Slicing. Web Wor ...

Posted by benzrf on Fri, 06 Mar 2020 23:03:48 -0800