[Android event processing] TouchListener PK OnTouchEvent + multi touch
TouchListener PK OnTouchEvent + multi touch
Introduction to this section
For example, this section brings you the comparison between TouchListener and OnTouchEvent, as well as the knowledge points of multi touch!
TouchListener is based on listening, while OnTouchEvent is based on callback!
Here are two simple examples to deepen ...
Posted by feelay on Tue, 01 Feb 2022 23:09:03 +0100
Android key response and page Jump
Several ways of key response
onClick binding function for setting keys in xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_ ...
Posted by depojones on Tue, 01 Feb 2022 22:50:32 +0100
Android error log capture
Recently, I sorted out the code of error log capture. Although there are many online, I added some ideas! The following code:
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputSt ...
Posted by duk on Tue, 01 Feb 2022 10:06:38 +0100
005 Android data storage
Android file system
In Android, each application is an independent user. The permission of a file or folder is represented by 10 letters
First letter:
d stands for folder-Representation file
The first group rwx represents the permission of the file owner to the file
r:readw:writex:execute
The second group rwx refers to the permission ...
Posted by hawk72500 on Tue, 01 Feb 2022 09:05:37 +0100
Use Android Studio to debug the application of LiveTV: transplant, compile and debug at one go
1. Preface
After the detailed explanation of a total of eight articles in "debugging system applications with Android Studio - TvSettings", I believe you have been able to make most of Android MK control system APK source code, transplanted into a project file that can be compiled and debugged with AS. Taking advantage of the hot ...
Posted by jl on Tue, 01 Feb 2022 00:57:22 +0100
Summary of Android NFC function usage
Recently, I sorted out and took over the project code, which is useful for NFC function. I took a time to understand it today. It should not be difficult to use it simply. I don't know about advanced extensions. Here's a summary!
Knowledge understanding
I saw a blog about NFC function on the Internet, which is divided into theory and practice ...
Posted by snrecords on Mon, 31 Jan 2022 22:12:25 +0100
Navigation retrace Fragment life cycle problem
Google launched Navigation mainly to unify the page Jump Behavior in the application.
'androidx.navigation:navigation-fragment:2.1.0'
'androidx.navigation:navigation-ui:2.1.0'
'androidx.navigation:navigation-fragment-ktx:2.1.0'
'androidx.navigation:navigation-ui-ktx:2.1.0'
Copy code
Add dependency
Navigation is easy t ...
Posted by pornost4r on Mon, 31 Jan 2022 19:21:02 +0100
android LifeCycle - simple use and detailed principle analysis
Pay attention to my official account: "an an an Android" "learn more knowledge"
What is Lifecycle used for
Lifecycle is used to store information about the lifecycle state of a component, such as an Activity or Fragment, and to allow other objects to observe this state.
More generally, you can get all the life cycle met ...
Posted by coder_ on Mon, 31 Jan 2022 18:19:12 +0100
Knowledge points about ellipsis in Groory language
[original: Style guide]
Style guide Java developers who start exploring Groovy can never get rid of the Java way of thinking, which will gradually affect the learning of Groovy. The following features will guide you to improve development efficiency and write more authentic Groovy code. The purpose of this document is to guide such deve ...
Posted by byenary on Mon, 31 Jan 2022 17:43:55 +0100
Summary of common attributes and methods of Bitmap and BitmapFactory
Bitmap represents a bitmap, and the picture encapsulated in BitmapDrawable is a bitmap object. In order to encapsulate a bitmap object into a BitmapDrawable object, developers can call the constructor of BitmapDrawable:
//Put one Bitmap Object packaging BitmapDrawable object
val drawable = BitmapDrawable(bitmap)
If you need to get the bitma ...
Posted by tlavelle on Mon, 31 Jan 2022 14:39:08 +0100