Several function interfaces that are ignored in the Android API

Source: Internet
Author: User

1. Several functions of motionevent

The following methods support multi-touch, that is, you can call the following method on a single touch point

1.1 Getpressure ()

This API can get pressure on the finger to touch the screen, but requires hardware and driver support ...

It helps us to make designs that are more materialized, such as:

1. Hand-painted. It is possible to simulate the brush's reach and the depth of the color according to the finger pressure, which makes the person feel more realistic.

2. Click action on the control. You can set the pressed effect of a control (such as a button) based on your finger pressure, such as the amplitude of the concave.

3. New operation mode. and fingers do not leave the screen, by adjusting the finger pressure to achieve the purpose of operation, such as simulating car plus throttle

1.2 GetSize ()

Gets the contact area of the screen when the finger touches the screen

This can be used to identify Fattouch events, which is a large area of touch event, which is often the user's wrong operation.

1.3 Gettooltype ()

Gets the type of object that triggered the current event: finger, stylus, or mouse (touch version)

I didn't think it would be useful.

2. Clipdata

Clipdata.additem (Clipdata.item Item)

This API can place text, resource addresses, and intent in a Clipdata object, and then save it in the system's clipboard, while the system's Clipboard can pass data across the application, so it can support the following features:

1. Copy, paste various files (Pictures, videos) and so on across the application, similar to Windows-like clipboard.

2. Because the resource address can be local or from the network, you can also directly copy the network side of the resources, similar to the PC-side Youdao cloud notes, directly copy the contents of the page to the local. The clipdata itself already supports formatted text with HTML tags.

3. A shortcut to the direct copy application, intent is the equivalent of starting a shortcut to an interface, so it is theoretically possible to copy a shortcut to any interface of the application, such as dialing someone's phone, initiating a video chat with someone.

1.3 Vibrator

Vibrator.vibrate (long[] pattern, intrepeat)

This API can control the rhythm of the vibration motor, can support the function:

1. Let users customize the rhythm of the vibration, iOS already has this feature.

2. Built-in several sets of vibration rhythm, and the alarm Bell sound match good, increase interest.

Several function interfaces that are ignored in the Android API

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.