LinearLayout linearLayoutMain = new LinearLayout(this);// 自定义一个布局文件 linearLayoutMain.setLayoutParams(new LayoutParams( LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); ListView listView = new ListView(this); listView.setFadingEdgeLength(0); List