Android(安卓)Name Rules 命名规则
16lz
2022-04-03
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...
更多相关文章
- 几行代码看程序员的水平——Android文件命名规范
- android文档开发规范
- Android命名规范(重点讲解:包名)
- [置顶] Android研发规范
- Android(安卓)常用的命名规范
- 在使用ListFragment的setEmptyText时报java.lang.IllegalStateEx
- android 重命名文件
- Android:规范命名,让合作更加愉快
- 基础 Android(安卓)开发规范整理