Android Name Rules 命名规则
A.Drawable
1.Background for icon,view,color
bg_(type)_(name).xml/png
bg_color_gray.xml
bg_color_round_gray.xml
bg_btn_wooden.png
bg_btn_store_dt.png
bg_btn_store_catg.png
bg_state_tab_choose.xml
2.Image for button or view
ic_(type)_(name).xml/png
ic_btn_mark_save.png
ic_btn_mark_delete.xml
ic_menu_save.png
B.Layout
1. Item for listview,gridview
item_(type)_(name).xml
item_list_history.xml
item_grid_history.xml
2.Layout for popup window
popup_(name).xml
popup_mark_edit.xml
3.Id of view in Layout
abbreviation for the views:
ViewPager:vpg
ViewFlipper:vfp
ScrollView:scv
| View | Abbr |
| LayoutView | lav(3 letters for viewgroup) |
| RelativeView | rev |
| ViewFlipper | vif |
| ScrollVIew | scv |
| TextView | tv |
| EditText | et |
| ImageView | iv |
| ImageButton | ib |
| Button | btn |
| ListView | lv |
| GridView | gv |
The name of the view should indicate the type. abbr_(activity name)_(view name)
RealtiveLayout:lay_rel
Linearlayout:lay_lin
FrameLayout:lay_fra
Layout均按 lay_*** 命名
Perfecting...

浙公网安备 33010602011771号