Android Jiugongge programming code

This paper introduces the design code of Jiugongge program.

1、 Related introduction

(1) Effect display

1. Effect when the program is just running:

2. Click to select and slide the screen on the page

3. Display after selecting password

(2) Function introduction

1. Click a circle and add a small circle in the center of the circle. 2. A following line appears when the page slides. 3. When sliding to another circle, a connected straight line is generated. 4. After the number of selected circles is greater than or equal to 4, lift your finger and save the password. 4. After the number of circles selected is the maximum, save the password immediately.

(3) Knowledge points involved

This example uses a custom view to draw the Jiugong grid and save the image. The nine points here represent nine values respectively. Obtaining the corresponding values proves that the point is drawn. Knowledge used in the program: 1. Image description, circle and point description, line description 2. Position judgment, judge whether the position of the user's point is in a circle 3. Save data and related judgment

2、 Programming

(1) Custom view design

(2) The main method calls the class of this view

The above is the code of Jiugongge programming. XML layout files are not used here. They are all implemented in code.

After completing the custom view, the call and use are relatively simple. It can be used as a tool class to get the passwords from the custom view, and can do other saving operations, such as saving to local files or databases. This is only a toast operation, so that users can see the effect.

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>