1. 使用ConstraintLayout减少嵌套,使用inclue,merge,viewstub等
2. 使用异步加载布局,AsyncLayoutInfater。
//子线程异步执行xml加载
new AsyncLayoutInflater().inflate(R.layout.activity_main.xml,null,new AsyncLayoutInflater.onInflateFinished(){
@override
public void onInFlateFinished(View view,int resid,ViewGroup parent){
setContentView(view)
}
})