Android daily experience

Source: Internet
Author: User

 

◆ Simulator log output in Android

In Ecipse, LOGCAT is enabled, but no information is displayed on the console.

Solution: select the simulator again in the DDMS view. Disable adb

 

 

◆ Inheritance relationship diagram of View in Android

 

◆ Remove the title from Android

RequestWindowFeature (Window. FEATURE_NO_TITLE );

 

◆ Setting of the virtual keyboard in Android

The virtual keyboard usually destroys the interface layout. If the View containing the EditText control is displayed, the virtual keyboard is automatically displayed. To avoid the above two situations, you can set a value in the Manifest. xml file.

Android: windowSoftInputMode = "adjustPan"

 

◆ What is the difference between drawable (hdpi, ldpi, and mdpi?

This is mainly to support multi-resolution.
Hdpi mainly contains high-resolution images, such as WVGA (480x800) and FWVGA (480x854)
The mdpi mainly contains medium-resolution images, such as HVGA (320x480)
Ldpi uses low-resolution images, such as QVGA (240x320)
The system will find the corresponding images in these folders according to the machine resolution.
Therefore, in order to be compatible with different screens of different platforms, we recommend that you store images of different versions in different folders as needed.

 

◆ Differences between the XML layout file @ + id/and @ id/in Android

It is newly defined in many places on the Android platform. For new users, it may be found in layout. what is the difference between an xml layout file like @ + id/and @ id? Here @ We can understand it as a reference, and the more + represents the new declaration. You can take a look at the many resources involved in the API Demos example in the Android SDK.

@ + Id adds a resource id
@ Id and android: id, reference existing resource id

Related Article

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.