kotlin uses Parcelize annotations to simplify Parcelable writing
kotlin uses Parcelize annotations to simplify Parcelable writing
Parcelize Note
kotlin added support for parcelable at version 1.1.4
The Android extension now includes an automated generator that implements Parcelable.The generator automatically creates the writeToParcel ()/ createFromParcel () method by declaring the serialized propertie ...
Posted by dennismcdougall on Wed, 15 Jul 2020 16:22:56 +0200
About how to set the default number of sms center number center, a huge question mark, solve!
For beginners, android 4.4 doesn't know how the default number for SMS centers is set, but now it's a rule to write a short summary of what you see every day, so let's just tell it!
First I found a place to set the SMS center number on the display of the control:
Filename: SimSettingPreferenceActivity.java
@Override
protected voi ...
Posted by bazza84 on Sun, 12 Jul 2020 18:24:47 +0200
Android Design Mode - Builder Mode
Builder mode is also a very common mode, such as AlertDialog in Android, which uses Builder design mode. Here is an example to illustrate.
1. First let's create a Person class
class Persion {
public String name; //Full name
public int age; //Age
public int income; //income
public String getName() {
return name;
...
Posted by eideticmnemonic on Sun, 12 Jul 2020 18:22:25 +0200
Custom ImageView implementation
The purpose is as follows:
This is only for the ImageView above, the composite layout in the middle, and the banner diagram below, which was also mentioned before the uniform color processing of the status bar.Analyze the top and bottom hooked view, which can be achieved by simply extending ImageView.
Consider the fo ...
Posted by T-Bird on Sat, 11 Jul 2020 16:39:36 +0200
Android implements request HTTP authentication
These days, the development of external SDK, can achieve landing, payment.Similar to developing a set of QQ, WeChat third party login.The authorization protocol used is OAuth 2.0.Among them, Http Authentication is used, and you can consult the online materials. There are all kinds of answers, some don't know if they have been verified, and some ...
Posted by bradleybebad on Fri, 10 Jul 2020 16:54:06 +0200
Record two official ViewPager animations
No more nonsense, just code it
1. This class is the basic implementation of ViewPager, and then add viewPager.setPageTransformer(); this method, you can add switching animation, very convenient
By the way, viewPager.setOffscreenPageLimit(4) ; this method, by default, is 1, which means preloading an adjacent page, one on the left and one on t ...
Posted by jeankaleb on Wed, 01 Jul 2020 17:43:26 +0200
Android studio novice development: weather app (Baidu map api + wind weather api + city query + broken line display)
Android studio novice development: weather app (Baidu map api + wind weather api + city query + broken line display)
1. Content introduction
2. Environment configuration
3. Import another demo
4. AS project analysis
5. Weather project flow
6. Data exploration
7. Module architecture
8,sharedpreference
9. C ...
Posted by jej1216 on Sat, 27 Jun 2020 10:24:04 +0200
Custom content provider
Custom content provider
1, What is content provider
2, Content provider role
1. Content provider
2. Content resolver
3, Custom content provider
1. Custom content provider
Step:
(1) Custom class inherits ContentProvider and rewrites its methods
(2) Manifest file registration content provider
2. ...
Posted by ericm on Wed, 24 Jun 2020 04:25:53 +0200
Specializing in fancy conquest of custom View, do you know all kinds of basic drawXXX() methods?
Please read this article before reading it Specialize in fancy (1) to the simplest custom View, increase self-confidence, you can do it.
As the second part of the fancy series, there is no nonsense in this part. It's all the basic knowledge needed to learn the custom View well. For example, to learn Eng ...
Posted by naturalbeauty7 on Tue, 23 Jun 2020 05:38:14 +0200
The lowest coupling way to add title block in history
preface
Most pages have a title block, which usually encapsulates the initialization code of the general title block in the base class, and then only needs to include a title block layout in the layout code, so it is very convenient to set the title block in the Activity.
This may be the current more ...
Posted by zkoneffko on Mon, 22 Jun 2020 10:36:33 +0200