Android Common Controls

Source: Internet
Author: User

Use of the 1.Log class

(1) log.v () v is the meaning of the verbose reminder

(2) LOG.D () d is debug debugging

(3) log.i () I is the meaning of info

(4) LOG.W () W is the meaning of the warn warning

(5) LOG.E () e is the meaning of error

(6) LOG.WTF () WTF is what the fuck is the focus of the wrong meaning

Android programming to see more logcat, look at the log cat print out the error log, to help debug the bug.

2.EditText control editing an input text control where the InputType property is important means that the type of the input type defaults to the text that is commonly used with the number password Textpassword

3.CheckBox Control check box control listener Checkbox.setoncheckedchangelistenner Listen check box is selected

4.sharedpreferences is a lightweight storage class on the Android platform, typically used to store configuration information.

Gets the method that the SP object calls Getsharedpreferences method There are two parameters, the first parameter is the name of the XML file, the second parameter is 0 or mode_private

Use SP to call Sp.edit () to get editor first

Common methods in this class Edit.putxxx (key,value) where xxx represents the data type that XXX represents is also the type of value corresponding to the Sp.getxxx method according to the key to find value values

Use SP to call Sp.edit () to get editor first

5.seekbar Controls and Setonseekbarchangelistener listeners

The Seekbar control consists of an important property progress seekbar.getprogress () Gets the process seekbar.setprogress () set process

Change listener Onseekbarchangelistenner Three methods in an excuse

The method that starts the drag call Onstarttrackingtouch

To end a drag call method Onstoptrackingtouch

Drag the method called in onprogresschanged

6. General Steps for Android development

1. Find layout to set UI interface first

2. Find the controls we care about

3. Set the Click event (Listener)

4. Deploy the program to the emulator and test

Android Common Controls

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.