问题 使用自定义view的时候,将其宽度设为match_parent,一直不能占满父控件. 原因 View view=LayoutInflater.from(context).inflate(R.layout.activity_ludan_item, null); 解决 View view=LayoutInflater.from(context).inflate(R.layout.activity_ludan_item, this,false);