Comprehensive implementation of Android OkHttp + Glide + RecyclerView + ButterKnife popular framework

requirement Use one OkHttp to obtain muke.com movie data (20 pieces), use Glide to load pictures and display them in each movie Item, and search and display them by movie name and type. Operation effect Task description 1, Contents displayed on the home page: Movie sea ...

Posted by plutoplanet on Tue, 24 May 2022 04:06:34 +0300

Android development practice - project learning notes

Display weather information [supplement] in the light of Android development practice - project learning notes (2) , the last part is to improve the code Add new data 1. Design layout 2. Prepare layout documents 3. Import to parent file 4. Change Java code ① Find control ② Update control content Step 1: activity_weather.xml <?xml version=" ...

Posted by blackthunder on Mon, 23 May 2022 21:28:03 +0300

Detailed explanation of design pattern and Python implementation

Design pattern and Python implementation What is the design pattern? Christopher Alexander: "each pattern describes a recurring problem around us and the core of the solution to the problem * so that you can use the solution again and again without having to do repetitive work." Design patterns are summarized and optimized to provide ...

Posted by axo on Mon, 23 May 2022 10:49:13 +0300

Imitating the source code of Tiktok short video system to take photos and videos based on CameraX

Background: Recently, I was working on an APP video upload project. Due to the use of my own server, there are certain memory restrictions. At present, most mobile phones have a large resolution, and the video captured is several megabytes in a few seconds. How to compress the recorded video is the same as wechat. Therefore, I consulted some ma ...

Posted by Loldongs on Mon, 23 May 2022 01:13:51 +0300

Strategic Patterns for Design Patterns

Policy Mode Behavioral patterns In Strategy Pattern, the behavior of a class or its algorithm can be changed at run time. In policy mode, we create an object representing various policies and a context object whose behavior changes as the policy object changes. The policy object changes the execution algorithm of the context object. introduce I ...

Posted by unknownsheep on Sun, 22 May 2022 23:14:27 +0300

Java thread pool Architecture Principle and source code analysis (ThreadPoolExecutor)

In the previous article on JUC, we mentioned the creation of thread pool exectors. In the article:< JUC series of java - external Tools >There are detailed descriptions in the first part of the, please refer to;   In fact, the article explains the external use mode, but does not say how the internal implementation is implemented. I ...

Posted by herschen on Sun, 22 May 2022 22:45:09 +0300

[Design Pattern]Template Method Pattern

Template method pattern Introduction The template method pattern is a simple and commonly used design pattern. It is a code reuse technology based on class inheritance. Its structure only has the inheritance relationship between the base class and the derived class. A template method is a concrete method that gives a top-level logical flow fra ...

Posted by JonathanS on Sun, 22 May 2022 20:11:21 +0300

Template mode of design mode

Project source code: CSDN : http://jacob.org.cn Nuwa's mistake The factory model tells the story of Nuwa making people. People are created and the world is lively, but when she looks down, they are all the same type. They lack love, hatred, joys, sorrows and other emotions. Human life is peaceful and light. Nu Wa suddenly patted her head and f ...

Posted by imartin on Sun, 22 May 2022 15:51:08 +0300

Command mode of JavaScript Design Mode [command decoupling]

Before explaining the command mode, let's first understand a command mode scenario in life: Scenario 1: Hospital treatment and prescription: When you go to the hospital to see a doctor because of kidney deficiency, the doctor comes to the conclusion after some operation: you need to take a course of treatment [Xia Sangju] and [Xiaochaihu] (the ...

Posted by AlGale on Sun, 22 May 2022 14:36:53 +0300

Adapter pattern -- Design Pattern

As the name suggests, adapters have to adapt to different current configurations and solve compatibility problems. Our life is full of all kinds of adapters. The modem used for Internet access is a kind of digital to analog conversion adapter, commonly known as "cat", but now it is all optical cat, that is, the mutual conversion of op ...

Posted by villas on Sun, 22 May 2022 13:37:03 +0300