Android Learning History Summary (ii)

Source: Internet
Author: User

1. resource file name can only be lowercase, or error will not generate R.java file

2.R files should be imported into your project's package instead of Android. R

3. Database operation using Sqliteopenhelper

4.values folder you define your own XML file, get the method is the r.__ horizontal line according to their own definition of the child node in the XML, for example, <string/> is r.string

Ctrl+shift+x and Ctrl+shift+y in 5.Eclipse for uppercase and lowercase conversions

6. Use <View> label with height of 1DP to achieve cutting line

7. When a fragment is superimposed on a fragment, there may be event penetrations, at which point the clickable= "true" of the fragment above can be

8.ImageButton by setting background= "#00000000" can become transparent, set its background as the picture background can be more beautiful, ImageButton need to set clickable= "true"

9.connctivitymanager.connectivity_action to monitor the network status changes, whether it is listening to all the network after the API description and then fill in

Wifimanager.network_state_changed_action to monitor WiFi network changes, including open and close two states

Wifimanager.wifi_state_changed_action to monitor WIFI status changes, including on, on, off, off

10. When you encounter a situation where nesting is not required, such as using Framelayout to create a single root node for a layout, you can use the <merge> tag instead of the <FrameLayou> tag. When a layout that includes a merge label is added to a layout, the merge node of the layout is deleted, and the child view of the layout is added directly to the new parent layout, and the merge label is used in conjunction with the include tag, in particular, The include tag is used to insert the contents of a layout into a layout

Viewstub is a hidden, non-memory-intensive view object that can delay loading the layout resource file when it executes. This layout resource file is loaded when viewstub is visible, or when the inflate () function is called.

12. A blog will be devoted to the respective and combined life cycle of activity and fragment

13. After the addition and deletion of the fragment, you can specify the animation, and then choose whether to add to the back stack, the last commit ()

14. You can use the "|" When you need to pass in a parameter such as a flag. To increase the number of references

15. Creating a class that inherits application can handle the entire application's lifecycle functions, such as opening the database at the start of the application and shutting down the database when the application process is terminated. However, the application node in the manifest manifest file is required to specify the Name property, with the value of its own class name

16. To re-register a broadcast recipient with a broadcast recipient, you need to use Context.getapplicationcontext (). Registerreceiver, Resolves receivercallnotallowedexception exceptions

17. When we receive a intent to make data changes to the intent and then send out, at this time, the recipient receives the intent is not the data, because by default, intent can not be reused, the data will be filtered out, Ability to use flag to identify different modes for reuse

18. Use ComponentName and remoteviews to update the desktop plugin view

The Terminate function in 19.Application does not have to be called, assuming that the database is not closed, and then reload the error, but will not prompt the user, only recorded in the log

20. Now I have a problem, when I add a fragment in a container that already has a fragment, the latter will not show that only replace can be used, the same time the implementation principle of popbackstack function also need to learn, then fill in

21. Use. 9.png

The 22.Manifest file uses the InstallLocation property to specify whether to agree or prefer to install the application on external storage (the user cannot reject or remove the SDK, or the application terminates immediately)
Not available for: Apps with Widgets, live wallpaper, and Live folder
Applications that provide non-disruptive services
Input Method Engine IME
Device Manager

Android Learning History Summary (ii)

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.