zoukankan      html  css  js  c++  java
  • 《团队-科学计算器-代码设计规范》设计文档

    1.代码布局设计

    缩进

      1.Tab实现

      2.空格实现

    字符串:

      1.单引号

      2.双引号

      3.避免反斜杠的出现。

    2.资源Res

      1.按照类型,分为以下几种

        控件Id命名:控件缩写 _模块(module) _功能名(function)

      2.Color命名

    Resources Type命名规则
    color 组件名+具体作用名。例 R.color.button_text

      3.String命名

    Resources Type命名规则
    string 具体功能。 例 R.string.hello

      4.Drawable命名

    Resources Type命名规则
    launcher icon ic_launcher。例R.drawable.ic_launcher
    normal icon ic_具体模块_功能。例R.drawable.ic_audio_pause
    Toolbar icon ic_ab_功能名。例如ic_ab_search
    selector selector_模块_功能名。例如 selector_login_button
    shape shape_模块功能名状态。例如 R.drawable.shape_login_button_pressed ,R.drawable.shape_login_button_normal
     

      5.Layout命名 

    类型命名规则
    activity activity_模块名。例如 R.layout.activity_login
    include layout_模块名_功能名。例如 @layout/layout_login_bottom
    widget widget_模块_功能。例如 R.layout.widget_app_clock
    list header header_模块_功能。例如 R.layout.header_main_top_ad
    fragment fragment_模块名。例如 R.layout.fragment_login_layout_header
     

      6.Menu命名

    Resources Type命名规则
    menu menu_模块名。例如 menu_login

      7.Values命名

    Resources Type命名规则
    color 模块名_color。例如 material_design_color
    dimens 模块名_dimens。例如 material_design_dimens
    style 模块名_style。例如 material_design_style
    themes 模块名_themes。例如 material_design_themes

  • 相关阅读:
    Spring Cloud 接口契约测试
    看我玩弄千万日志于股掌
    从哲学层面浅谈计算机学习方法论
    一切互联网优势都是效率优势,一切竞争最终都是效率之争
    Arduino--蜂鸣器
    Arduino--光感应模块--模拟输入
    Arduino---按钮
    Arduino--PWM引脚
    Arduino专用绘图软件Fritzing
    点亮LED灯
  • 原文地址:https://www.cnblogs.com/s18242883963/p/7625265.html
Copyright © 2011-2022 走看看