Common design patterns in android

Singleton mode Ensure that a class has only one instance and that it instantiates itself and provides this instance to the entire system. public class Singleton { private static volatile Singleton instance = null; private Singleton(){ } public static Singleton getInstance() { if (instance == null) { syn ...

Added by dirkadirka on Sat, 29 Jun 2019 19:49:31 +0300

Android WebView and JS pages call each other (4)

WebView should still be used very frequently in current projects. Personally, I always think HTML5 is a trend. Find something to sum up here. At the end of this article, there is a very good Html5Activity loading class. If you don't want to see it, you can download it directly. WebSettings WebSettings webSettings = mWebView .getSetting ...

Added by Elusid on Sat, 29 Jun 2019 03:28:50 +0300

Function realization of android inquiry bus and several stations

Copyright Statement: This article is the original article of the blogger. It can not be reproduced without the permission of the blogger.             Android Baidu Map-based Enquiry of Peripheral Buses    The last article introduced how to use Baidu Map to locate on Android platform. Next, it introduced how to use Baidu Map to ob ...

Added by liljim on Sat, 29 Jun 2019 02:57:25 +0300

10 front-end knowledge points per day: acrobatics

Personal blog is online. Welcome to visit and comment!No Reason - wangchloe's Personal Blog If you have any questions, please let me know immediately to amend the following contents, so as not to mislead more people. toString() && valueOf() JSON stringify & parse +new Date() Analysis of Array.prototype.slice.call(arguments, 0) J ...

Added by twatkins on Fri, 28 Jun 2019 23:46:11 +0300

Componentization using ARouter

ARouter is an open source project on github by Ali. The address is: ARouter This article does not focus on sharing the use of ARouter, but on sharing how ARouter is decomposed.For detailed use, you can see the documentation and ask questions in groups.On how to write a route for componentization, I recommend reading an article from my colleague ...

Added by angelkay73 on Thu, 27 Jun 2019 20:14:06 +0300

Android 6.0 Quick Request for Rights (more elegant based on RxJava2)

1. Preface Preface?Where is so much nonsense? Get straight to the point! 2. Rights to apply for Cough and cough, before we get to the topic, let's first know which permissions need to be applied for manually after Android 6.0. If you take the right medicine, it's the kingdom! group:android.permission-group.CONTACTS (Mobile Contact Rela ...

Added by mm00 on Thu, 27 Jun 2019 19:48:03 +0300

SnapKit Use Details

SnapKit functions as SDAutoLayout and Masonry (the predecessors) to achieve automatic layout of controls by constraints; it is more convenient to maintain than StoryBoard because of its code implementation. I think the automatic layout of iOS is very similar to the Relative Layout in Android, which determines the final size and location through ...

Added by sheen.andola on Thu, 27 Jun 2019 01:47:13 +0300

Using Realm as Local Storage in Android

Android platform has many orm frameworks that can store data locally, such as ormlite, green Dao, SugarORM and so on. These orm frameworks are basically sqlite-based. The database Realm I'm going to introduce today is a solution to replace sqlite. It has its own database storage engine. It's lighter and faster than sqlite. Most importantly, i ...

Added by mazman13 on Thu, 27 Jun 2019 01:37:50 +0300

Implementation of Android Custom Composite Control CheckBox Change

Foreword: The greatest advantage of custom composite control is reusability, which can save us a lot of code. But when we customize composite control, the encapsulated control is either used by ourselves or by others. The encapsulated code should be readable and easy to modify. There is no need to encapsulate too many attributes. Generally, it ...

Added by MG-WebDesigns on Thu, 27 Jun 2019 00:47:40 +0300

Android desktop suspension window effect realization, imitation 360 mobile guard suspension window effect

From: http://blog.csdn.net/guolin_blog/article/details/8689140 Hello, everybody. Today I'm going to give you a tutorial that imitates the effect of 360 mobile phone guard suspension window. Before we start, please allow me to say a few irrelevant nonsense. Unconsciously I found myself in contact. Android It has been nearly three yea ...

Added by Ashoar on Thu, 27 Jun 2019 00:30:21 +0300