標題里已經(jīng)把這個意思表達清楚了,兩個參數(shù)意思一樣,只是某大仙覺得match_parent更貼切,于是從2.2開始你兩個詞都可以用。那么如果考慮低版本的使用情況你就需要用fill_parent了。 下面是兩者相同的證據(jù),看android.view.ViewGroup里的靜態(tài)嵌套類LayoutParams中的代碼: - public static final int FILL_PARENT = -1;
/**
* Special value for the height or width requested by a View.
* MATCH_PARENT means that the view wants to be as big as its parent,
* minus the parents padding, if any. Introduced in API Level 8.
*/
public static final int MATCH_PARENT = -1;
/**
* Special value for the height or width requested by a View.
* WRAP_CONTENT means that the view wants to be just large enough to fit
* its own internal content, taking its own padding into account.
*/
復制代碼 </font |