Several common design patterns in Java

Singleton mode Simply put, in an application, there is only one instance object of a class. You can't go to new because the constructors are decorated by private. Generally, they get their instances through getInstance().   The return value of getInstance() is a reference to an object, not a new instance, so don't misunderstand it as multipl ...

Posted on Sun, 03 May 2020 17:34:39 -0400 by neo_phyte

Android reward function: Alipay transfer

It is suitable for individual developers to develop APP, allowing users to reward the author, in essence, to transfer Alipay accounts to designated accounts. First, open the Alipay APP, click the "collection" function, save the payroll code (Er Weima) picture to the mobile phone (further move to the computer). 2. Find an online QR cod ...

Posted on Sun, 03 May 2020 16:35:33 -0400 by sergio-pro

Check whether Android supports fingerprint recognition and whether fingerprint has been entered

Android M starts, and fingerprint related functions are added to the system The main classes used are: FingerprintManager Only three methods are available: Return value Method signature Explain void authenticate(FingerprintManager.CryptoObject crypto, CancellationSignal cancel, int flags, FingerprintManager.AuthenticationCallback ...

Posted on Sun, 03 May 2020 15:50:13 -0400 by pernest

BootStrap entry responsive fence

Introduction: 1. Note: bootstrap divides each line into 12 parts Media query: If the screen is large, each line displays 6 Super large computer, screen resolution > 1200 use: col-lg-2 If the screen is small, 4 are displayed in each line 992 < screen resolution < 1200 use: col-md-3 Smaller, 2 p ...

Posted on Sun, 03 May 2020 13:36:41 -0400 by wannalearnit

[Android development tips] Android 6.0 dynamically obtains permissions and handles them at runtime

With the release of Android 6.0, some changes have also been brought. Here we mainly talk about the handling of runtime permissions in Android 6.0. About runtime permissions In the old permission management system, the permission is only asked to the user once when the App is installed, and the user can install the ...

Posted on Sun, 03 May 2020 07:05:02 -0400 by njm

Loading content at the bottom of the page by offset

This paper is a small demo to load new data at the bottom of the web page. The effect is as follows: demo address: demo 1. How to judge whether the web page slides to the bottom? As shown in the figure, the black area is the real length of the web page, and the red area is the visible area of the user (that is, the trend displayed by th ...

Posted on Sun, 03 May 2020 03:16:41 -0400 by Pinkerbot

Android Edittext mobile number format input settings

1, Renderings According to the demand, it is necessary to input the digital text in the format of mobile phone number, which can be automatically separated into beautiful format with space according to the mobile phone number when input. After clicking, it can verify whether the mobile phone number is a mobile phone number 2, Code impleme ...

Posted on Sat, 02 May 2020 18:34:59 -0400 by Gayathri

Android PictureInPicture (picture in picture function)

Android 8.0 introduced Picture in Picture (Picture in Picture function), which is currently only supported on systems above 8.0. Compared with IOS,IOS's Picture in Picture mode is a multi task function added by apple in iOS 9. Let's take a look at the effect: I believe that many people have already experienced ios mobile app. I'm glad that G ...

Posted on Sat, 02 May 2020 13:26:33 -0400 by cockney

Android basic web communication 3

In Android basic web communication 2, the JSONObject I used is a native JSON class of Android, imported through import org.json.JSONObject. There's another simpler way to do this, which is to use Gson parsing 1, Import Gson package Copy the jars you need to add and paste them into the app - src - main - libs folder. Android studio projects t ...

Posted on Sat, 02 May 2020 08:50:48 -0400 by trollll

Thinking about the framework design of iOS native application written in Python (first article)

1, Intron To write iOS native applications in Python, why do you have such an idea is actually originated from the learning of the cross platform framework of JS class. Students who are familiar with native development all know that most of the cross platform native frameworks are implemented by JS. The reason is that Apple has built in a JS e ...

Posted on Sat, 02 May 2020 05:29:54 -0400 by st3ady