安卓开发代码规范以及命名规范

1)注释模板
新建类,自动生成类注释;设置注释模板;
/** * Created by ${USER} on ${DATE}. * Project:XunPiGe * Package: com.xunpige * Version:1.0 * Author:crs */ 2)对于尺寸的抽取:dimens.xml文件中
<resources> <dimen name="dp_0">0dp</dimen> <dimen name="dp_1">1dp</dimen> <dimen name="dp_2">2dp</dimen> <dimen name="dp_4">4dp</dimen> <dimen name="dp_5">5dp</dimen> <dimen name="dp_6">6dp</dimen> <dimen name="dp_8">8dp</dimen> <dimen name="dp_10">10dp</dimen> <dimen name="dp_12">12dp</dimen> <dimen name="dp_13">13dp</dimen> <dimen name="dp_14">14dp</dimen> <dimen name="dp_15">15dp</dimen> <dimen name="dp_16">16dp</dimen> <dimen name="dp_17">17dp</dimen> <dimen name="dp_18">18dp</dimen> <dimen name="dp_20">20dp</dimen> <dimen name="dp_22">22dp</dimen> <dimen name="dp_24">24dp</dimen> <dimen name="dp_25">25dp</dimen> <dimen name="dp_30">30dp</dimen> <dimen name="dp_35">35dp</dimen> <dimen name="dp_38">38dp</dimen> <dimen name="dp_40">40dp</dimen> <dimen name="dp_44">44dp</dimen> <dimen name="dp_46">46dp</dimen> <dimen name="dp_48">48dp</dimen> <dimen name="dp_50">50dp</dimen> <dimen name="dp_60">60dp</dimen> <dimen name="dp_65">65dp</dimen> <dimen name="dp_70">70dp</dimen> <dimen name="dp_72">72dp</dimen> <dimen name="dp_86">86dp</dimen> <dimen name="dp_97">97dp</dimen> <dimen name="dp_100">100dp</dimen> <dimen name="dp_103">103dp</dimen> <dimen name="dp_145">145dp</dimen> <dimen name="dp_160">160dp</dimen> <dimen name="dp_190">190dp</dimen> <dimen name="dp_200">200dp</dimen> <dimen name="dp_400">400dp</dimen> <dimen name="dp_450">450dp</dimen> </resources> 3)对于字体大小的抽取:dimens.xml文件中
<dimen name="text_size_micro">12sp</dimen> <dimen name="text_size_small">14sp</dimen> <dimen name="text_size_15">15sp</dimen> <dimen name="text_size_16">16sp</dimen> <dimen name="text_size_medium">18sp</dimen>

你可能感兴趣的:(注释,代码规范)