Android - compare the version number size as an Android Developer
return -1;
}
}
return 0;
} else {
return diff > 0 ? 1 : -1;
}
}
### [] (II) installation of apk
/**
Install APK @param context @param filePath
*/
public static void installApk(Context context, String filePath) {
try {
/**
* provider
* Handle the abnormal in ...
Posted by peytonrm on Wed, 08 Sep 2021 06:56:31 +0200
Are SharedPreferences thread safe? What is the difference between commit and apply?
1. Preface
I met this problem when I interviewed iqiyi today. It's really ignorant because:
Usually, when using, a single App does automatic login, so it has always been operated by one thread, so I haven't thought about whether SharedPreferences is safe under multithreading.For commit and apply, I read some blogs saying that commit is better ...
Posted by semtex on Wed, 08 Sep 2021 04:06:23 +0200
eclipse-based android project reality-savvy logon picture verification code
This project is written in eclipse software. Through my own practice, it is true and effective. I hope it can help you.😘😘 Project Version: Android 5.1.1 ADT version: 23.0.6 SDK Version: 24.4.1 Run simulator: Night God simulator If there are any shortcomings or inappropriate places, you're welcome to be pointed out by the big guys
Source do ...
Posted by eurozaf on Wed, 08 Sep 2021 02:33:31 +0200
Glide source code compilation and analysis (Tencent interview reference answers, Android Interview Questions Summary)
public final class RequestOptions extends BaseRequestOptions<RequestOptions> {
private static RequestOptions skipMemoryCacheTrueOptions;
private static RequestOptions skipMemoryCacheFalseOptions;
private static RequestOptions fitCenterOptions;
private static RequestOptions centerCropOptions;
private static RequestOptions circleCropOption ...
Posted by jonstu on Tue, 07 Sep 2021 08:03:08 +0200
FFmpeg is introduced into Android Studio, which is the favorite of the white whoring party
Then let's see how to build an environment for compiling FFmpeg?
Build an environment for compiling FFmpeg
=========================================================================
FFmpeg provides a complete solution, but this solution is written in C. we download the source code of FFmpeg and decompress it to see what the source code of FF ...
Posted by Boxerman on Mon, 06 Sep 2021 06:46:11 +0200
Jetpack: ViewModel user guide, detailed analysis of implementation principle!
brief introduction
In order to better divide the functions, Android provides us with the ViewModel class, which is specially used to store the data required by the application page. ViewModel can be understood as something between View and Model. It acts as a bridge so that the View and data can not only be separated, but also maintain c ...
Posted by nlhowell on Sun, 05 Sep 2021 05:56:24 +0200
Android Development UI Programming - --Button Button
        Button controls are a subclass of TextView, so most of the properties of TextView can also be used in Button. The difference is that we can set the background property of Button to StateListDrawable, which allows buttons to display different images in different states.
StateListDrawable
StateLis ...
Posted by PlagueInfected on Fri, 03 Sep 2021 20:22:25 +0200
android system camera returns picture (original)
Jurisdiction
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"></uses-permission>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></u ...
Posted by pharcyde0 on Mon, 20 Jul 2020 16:29:32 +0200
Android login registration interface add video background method (simple version)
Describes how to add a video background to the interface found on the Internet, which mimics keep
1. First add the raw folder under the res folder and copy in the video you want to use
2. Add video_under the layout folderBackground.xmlLayout, add Videview control inside layout
3. Change AndroidManifest.xml Content removes Bar from the disp ...
Posted by mhsjrotc on Thu, 16 Jul 2020 17:00:41 +0200
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 phpHappy on Wed, 15 Jul 2020 16:21:33 +0200