Android Development Artifact: OkHttp Framework Source Parsing

Preface HTTP is our modern application network for exchanging data and media streams. Effective use of HTTP can save bandwidth and load data faster. Square's open source OkHttp network request is an efficient HTTP client. Previous knowledge is limited to the use of framework API. After touching the actual work, I know my lack of knowledge. So ...

Posted by ladokha on Tue, 14 May 2019 05:32:54 -0700

Android window mechanism

1. Familiar with window structure diagram: 2. Understanding PhoneWindow, DecorView, Windows Manager, ViewRootImpl and other keywords. 2.1 PhoneWindow Every Activity has an instance of a Windows object, which is actually PhoneWindow type, so it can be seen that PhoneWindow is a subclass of Windows. Knowledge: Every Activit ...

Posted by The Stewart on Tue, 14 May 2019 03:48:42 -0700

Android mimics the effect of ant forest water droplets

Click "Android Technology Grocery Store" above and select "Top Public Number" Dry article, first time service!   Author: laer_L Link: https://www.jianshu.com/p/cc526bb34414, this article is authorized by the author. I haven't written anything for a long time, and you may come down again. You may thin ...

Posted by dark_mirage on Sun, 12 May 2019 05:03:41 -0700

Android Source Notes--Activity Manager Service

ActivityManagerService Activity Manager Service (AMS) is one of the three core functions of the Android kernel, and the other two are Windows Manager Service and View. Activity Manager Service manages four components. Android wants to obscure the role of process and replace it with the concept of component. Activity Manger Ser ...

Posted by Rik Peters on Sun, 12 May 2019 00:12:55 -0700

Learning notes from java to kotlin

Preface In the past, most of android development used java, but because of the introduction of kotlin, the company began to use kotlin, so here is a note to learn kotlin. Basic grammar Basic types There is no basic type in kotlin, where everything is an object, which also leads to its lack of automatic conversion function ...

Posted by peri on Sat, 11 May 2019 22:54:48 -0700

Android WebView analysis and collation

Primitive simple usage Add WebView to the layout file <?xml version="1.0" encoding="utf-8"?> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent" /> Load WebView with LoadUrl() method ...

Posted by bassdog65 on Sat, 11 May 2019 22:43:14 -0700

Anchor Location Based on Android

I believe that the front-end has done the function of page anchor location, through <a href="#head"> to set the page anchor location jump. This article uses tablayout and scrollview to realize the function of android anchor location. Design sketch: Implementation ideas 1. Monitor scrollview sliding position, tablayout switch to ...

Posted by FireyIce01 on Sat, 11 May 2019 22:03:55 -0700

RecyclerView Encapsulation Library and Comprehensive Case [Including 25 Blogs]

Directory Introduction 1. Introduction to Complex Page Library 2. Advantage highlights of this library 2.1 supports multiple state transition management 2.2 Support for adding multiple header s and footer s 2.3 Support for side sliding and dragging 2.4 Introduction to Other Highlights 3. How to use the introduction 3.1 Basic Use 3.2 Add ...

Posted by mhouldridge on Sat, 11 May 2019 21:44:31 -0700

Size optimization of android installation packages

First, how to optimize? 1: Identify what needs to be optimized Using Android APK Analyzer to analyze the size of each part of APK, the size distribution of version 5.1.1 APK is as follows:          The result of the analysis is that three areas need to be optimized res(app resources include images and xml resources) clas ...

Posted by codeDV on Sat, 11 May 2019 18:13:56 -0700

Talk about Service Timeout in ANR

1. Core Source Key Classes Path (/frameworks/base/) ActiveServices.java services/core/java/com/android/server/am/ActiveServices.java ActivityManagerService.java services/core/java/com/android/server/am/ActivityManagerService.java AppErrors.java services/core/java/com/android/server/am/AppErrors.java 2. ANR Basic Cognition What is 2 ...

Posted by Scott_J on Sat, 11 May 2019 10:42:13 -0700