Android uses ViewPager to implement APP's guide page and dot

The display effect on the simulator is as follows: The general idea and code are as follows: 1. First, create a layout file, <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_widt ...

Posted by bhawap on Fri, 10 Jan 2020 16:12:17 +0100

Click the button in Android to start another Activity and transfer values between activities

scene Click the button in the first Activity to start the second Activity, close the second Activity and return to the first Activity. Pass the value to the second Activity in the first Activity, and get and display it in the second Activity. Open the second Activity Activity value passing     Note: Blog:https://blog.csdn.net/badao_liumang_ ...

Posted by 2DaysAway on Fri, 10 Jan 2020 15:24:36 +0100

Android touch event delivery mechanism, as before

Preface To be a great Android developer, you need a complete Knowledge System Here, let's grow up as we want. 1. Understanding the composition of Activity An Activity contains a Window object, which is implemented by PhoneWindow.PhoneWindow uses DecorView as the root View of the entire application window, and this DecorView divides the screen i ...

Posted by rocket on Thu, 09 Jan 2020 06:51:30 +0100

Plugging - Class Loading

Recent learning plug-in, see all kinds of brain pain, now write some notes with your own hands for future review, there are incorrect understanding, please point out Loading classes is accomplished through the class loader ClassLoader, which has several classloaders, as follows pathClassLoader can be understood as loading activities written ...

Posted by sdat1333 on Thu, 09 Jan 2020 04:55:06 +0100

Alipay switch

First look at the style of Alipay switch.       Without saying much, we start to analyze and achieve this effect, as shown in the figure above: 1: Draw the layout when it is not selected item_lout_select_button Effect: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.andr ...

Posted by Pro.Luv on Wed, 08 Jan 2020 17:24:27 +0100

Template method pattern and practice of Java design pattern: application crash handling

Template method mode and practice: application crash handling This paper mainly introduces the template method pattern, and uses the template method pattern to develop an extensible Android application crash handling tool class. Template method mode and practice: application crash handling Principle and Application Actual ...

Posted by invarbrass on Tue, 07 Jan 2020 17:22:12 +0100

Android power on skip ANR

1. reasons In some low-end mobile chips, it will be found that when the power on wizard is turned on, it is easy to have various situations of gms application of anr, which is caused by high cpu. However, for chips with poor performance, it is easy to cause anr, so the solution 1 is to skip skip anr. 2. Judgment time Search ...

Posted by tendrousbeastie on Tue, 07 Jan 2020 06:36:39 +0100

Implementation of android keyword special color display

In the process of our development, we often encounter several words in the middle of a paragraph of text that need to be displayed in special colors or sizes. There are many new developments that don't have a clue. Let me introduce several commonly used implementation methods, first of all, the renderings: 1, Multi TextView ...

Posted by defect on Tue, 07 Jan 2020 04:57:18 +0100

android Bluetooth printing

Bluetooth connection of mobile phone uses Jiabo printer (ZH380) Bluetooth privileges <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.BLUETOOTH" /> android 6.0 and above also need to add location permission <uses-permission android:nam ...

Posted by ankurcse on Mon, 06 Jan 2020 13:16:58 +0100

Transfer of values between Activity and Activity,Activity and Fragment,Fragment and Fragment

1, Value passing between Activity and Activity First create two activities, one is MainActivity and the other is SecondActivity Then add a Button in activity main.xml, the code is as follows: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app ...

Posted by TheHyipSite on Mon, 06 Jan 2020 07:35:23 +0100