Implementation of multiple Click events in Android

Source: Internet
Author: User
<span id="Label3"></p><p><p><span style="FONT-SIZE: 14px">1. In the Android system, set up on the phone------android version (that is, Three will appear after the version of Android version number, as well as some motion map, is an egg!).<br>2. Import setting source code, ctrl+h search file (keyword android Version), search to open XML file after<br>3. is a strings.xml file, find the keyword firmware_version again and search Again. Locate the source code file under SRC<br>4. Find a keyword key_firmware_version, turn over to find out more about multiple click events Onpreferencetreeclick (preferencescreen preferencescreen, Preference Preference) method<br>5. You can easily implement multiple click events by removing unwanted code and copying useful related Code. Here 3 can be changed to the value of any value >=2<br></span></p></p><p><p><span style="FONT-SIZE: 14px"><span style="FONT-SIZE: 16px">long[] mhits = new long[3];<br>System.arraycopy (mhits, 1, mhits, 0, mhits.length-1);<br>mhits[mhits.length-1] = Systemclock.uptimemillis ();<br>If (mhits[0] >= (systemclock.uptimemillis ()-500)) {<br>3 Reads and executes<br>}</span></span></p></p><p><span style="FONT-SIZE: 14px">explanation: public static void Arraycopy (Object src,<br>int srcpos,<br>Object dest,<br>int destpos,<br>int Length)<br>Src: Source array; srcpos: The starting position where the source array is to be copied;<br>Dest: the destination array; destpos: the starting position of the destination array placement; length: the lengths of the Copies.<br>Note: both SRC and dest must be of the same type or an array of types that can be Converted.</span></p><p><p><span style="FONT-SIZE: 14px">This function can be used to replicate itself to itself, for example:<br>int[] Fun ={0,1,2,3,4,5,6};<br>System.arraycopy (fun,0,fun,3,3);<br>The result is: {0,1,2,0,1,2,6};</span></p></p><p><p>Implementation of multiple Click events in Android</p></p></span>

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.