Interaction between WebView and JS
1. Summary of Interactive Ways
Android Calling methods with JS through WebView is actually:
Android calls JS code
JS calls Android code
The bridge between them is WebView
There are two ways for Android to call JS code:
1. Load Url () through WebView
2. Evaluate Javascript () via WebView
There are three ways for JS to call ...
Posted by agulaid on Fri, 28 Jun 2019 22:05:49 +0200
Week 3 (1) Preliminary design and coding of app pages
Introduction
This week, we mainly do page design and code writing. In the previous two days, we mainly did the following work:
Preliminary Design of Pages and Logical Interaction Design
Client Code Writing
Background Coding
Next, I will introduce the registration function, which is part of my work in writing client code.
Registration fun ...
Posted by jasonscherer on Fri, 28 Jun 2019 19:33:03 +0200
Shared Preferences of Android
Shared Preferences, as one of Android's data storage methods, is characterized by:
1. Only Java basic data types are supported, and custom data types are not supported.
2. Data sharing in application;
3. Easy to use.
Usage method
1. Storage of data
SharedPreferences sp = getSharedPreferences("sp_demo", Context.MODE_PRIVATE);
sp.edit(). ...
Posted by tpstudent on Fri, 28 Jun 2019 01:08:12 +0200
The token use of OkHttp
Principle analysis
The general logic of token is that the login interface obtains a token and refresh_token for refreshing token.
In the next token request, all interfaces need to carry the token request so that the server can verify that the source of the request is legitimate.
This token is timeliness, the server will give him a timeliness ...
Posted by joking on Thu, 27 Jun 2019 23:58:34 +0200
Tab Layout and ViewPager
I. Introduction
Above is the homepage Tab of the Android side of the brief book. Tab is also very common in other apps. It can be implemented in many ways: TabHost, custom controls (third-party libraries), RadioGroup and so on. This article mainly introduces the use of TabLayout in the Android Design library.
TabLayout and ViewPager are ...
Posted by hhisc383 on Thu, 27 Jun 2019 21:53:19 +0200
Using Docker to Build AOSP(Android Source Code) Compiling Environment on Mac Platform
Local environment: macOS 10.12.5
Working directory: ~/android-docker/
I. Preparing case-sensitive disk images
Create a disk image
First, use the following command to view disk information.
diskutil info /
If the File System Personality of disk information is Case-sensitive Journaled HFS+, then the current file system is case-sensitiv ...
Posted by Xproterg^vi on Thu, 27 Jun 2019 21:20:54 +0200
Summary of Android Data Binding (II)
Preface
In my last article, I briefly learned about the environment configuration and basic usage of DataBinding:
Summary of Android Data Binding (I)
This article summarizes the basic ways of using Google's official documents.
Basic data binding
1. Objects (JavaBean s) can be created in this way:
/**
* Created by QingMei on 2017/5 ...
Posted by Carlo Gambino on Thu, 27 Jun 2019 20:16:47 +0200
Getting Started One Week Kotlin(2)
This chapter focuses on collections, operator overloading, control flow operators, and so on.In addition to collections, you can think that other content is more complicated and difficult to use. I suggest that the reader practice more, or the brothers will not help you!
Kotlin mainstream collection framework
Frame analysis of sets
If ...
Posted by MysticalCodex on Thu, 27 Jun 2019 19:03:56 +0200
Explain the use of ContentProvider
Preface
In Android, data sharing between applications is a very common thing, and the typical scenario is to read the phone address book. In order to share data safely and efficiently, Android provides ContentProvider, a component called ContentProvider. This article briefly explains the use of ContentProvider.
Accessing data in other appl ...
Posted by dgrinberg on Thu, 27 Jun 2019 00:30:24 +0200
Official DEMO Analysis of Android-Architecture-Componets
At the 2017 Google IO conference, besides android, Kotlin, there is a new architecture, componets. There are many introductions about the architecture itself on the internet. I will briefly analyze the demo provided by the government. After all, it is the kingdom to write code.
First, add a basic knowledge of componets: the schematic diagram ...
Posted by Dia:NL on Thu, 27 Jun 2019 00:26:15 +0200