lesson 2 How to piece together an interface

Program entry:
MainActivity.java

Program layout:
res/layout/activity_main.xml

Definition resource file:
values/ XML file containing simple values ​​(such as strings, integers, colors, etc.). Here are some resource naming conventions under folders. arrays.xml represents an array resource, accessed through the R.array class; integers.xml represents an integer resource, accessed through the R.integer class; bools.xml represents a boolean resource, accessed through the R.bool class; colors.xml represents a color resource, Access through R.color class; dimens.xml represents dimension value, accessed through R.dimen class; strings.xml represents string resource, accessed through R.string class; styles.xml represents style resource, accessed

color through R.style class / XML file that defines the list of color states. They are saved in the res/color/ folder and accessed through the R.color class to

drawable/image files, such as .png, .jpg, .gif or XML files, which are compiled into bitmaps, state lists, shapes, and animated images. They are saved in the res/drawable/ folder, accessed through the R.drawable class

menu/ XML files that define application menus, such as options menus, context menus, submenus, etc. They are stored in the res/menu/ folder and are accessed through the R.menu class to


access resource files:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326092069&siteId=291194637