int w = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED); int h = View.MeasureSpec.makeMeasureSpec(0,View.MeasureSpec.UNSPECIFIED); listView.measure(w,h); int height = listView.getMeasuredHeight(); Log.e("ee","page1中listview的高:" + height);原文链接:https://www.f2er.com/xml/296890.html