# CodeRole **Repository Path**: kooeasy/CodeRole ## Basic Information - **Project Name**: CodeRole - **Description**: 编码规范,注意事项,必须遵守的规则 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-07-06 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #CodeRole 编码规范 ## Java 部分 ## Android 部分 ### LayoutInflater 部分 1. LayoutInflater 的使用 LayoutInflater 的 inflate 方法必须使用三个参数 (int layoutRes, ViewGroup parent, boolean attach) 如果第二个参数设置,那么默认会自动把布局加入到parent 如果第三个参数设置为 false,那么就不会加入到 parent 第二个参数的作用可以实现加载的布局中最外层根标签的布局属性不变 1. Fragment 加载界面的时候,也必须使用三个参数,第三个参数为 false