阿里Android开发手册笔记---命名

Activity 的 layout 以 module_activity 开头
Fragment 的 layout 以 module_fragment 开头
Dialog 的 layout 以 module_dialog 开头
include 的 layout 以 module_include 开头
ListView 的行 layout 以 module_list_item 开头
RecyclerView 的 item layout 以 module_recycle_item 开头

GridView 的行 layout 以 module_grid_item 开头

 drawable  模块名_业务功能描述_控件描述_控件状态限定词  module_login_btn_pressed

anim  模块名_逻辑名称_[方向|序号]    module_fade_in    module_push_down_in (动画+方向)

frame 动画资源:尽可能以模 块+功能命名+序号。如:module_loading_grey_001

 color     模块名_逻辑名称_颜色    <color name="module_btn_bg_color">#33b5e5e5</color>

dimen 资源以小写单词+下划线方式命名,写入 module_dimens.xml    

<dimen name="module_horizontal_line_height">1dp</dimen>

父 style 名称.当前 style 名称    ParentTheme.ThisActivityTheme

string    模块名_逻辑名称    moudule_login_tips

LinearLayout             ll
RelativeLayout         rl
ConstraintLayout     cl
ListView                  lv
ScollView                sv
TextView                tv
Button                   btn
ImageView            iv
CheckBox              cb
RadioButton          rb
EditText                 et

其它控件的缩写推荐使用小写字母并用下

ProgressBar 对应的缩写为 progress_bar

DatePicker 对应的缩写为 date_picker











猜你喜欢

转载自blog.csdn.net/qq_28791419/article/details/79842179