首頁(yè) 收藏 QQ群
 網(wǎng)站導(dǎo)航

ZNDS智能電視網(wǎng) 推薦當(dāng)貝市場(chǎng)

TV應(yīng)用下載 / 資源分享區(qū)

軟件下載 | 游戲 | 討論 | 電視計(jì)算器

綜合交流 / 評(píng)測(cè) / 活動(dòng)區(qū)

交流區(qū) | 測(cè)硬件 | 網(wǎng)站活動(dòng) | Z幣中心

新手入門(mén) / 進(jìn)階 / 社區(qū)互助

新手 | 你問(wèn)我答 | 免費(fèi)刷機(jī)救磚 | ROM固件

查看: 18394|回復(fù): 1
上一主題 下一主題
[教程]

Android2.2中match_parent和fill_parent是一個(gè)意思

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
發(fā)表于 2013-8-28 16:30 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式 | 未知
標(biāo)題里已經(jīng)把這個(gè)意思表達(dá)清楚了,兩個(gè)參數(shù)意思一樣,只是某大仙覺(jué)得match_parent更貼切,于是從2.2開(kāi)始你兩個(gè)詞都可以用。那么如果考慮低版本的使用情況你就需要用fill_parent了。
下面是兩者相同的證據(jù),看android.view.ViewGroup里的靜態(tài)嵌套類(lèi)LayoutParams中的代碼:   
  1. 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.   
           */
復(fù)制代碼
   </font

上一篇:Android程序設(shè)計(jì)(13)-如何在Eclipse上開(kāi)發(fā)Android應(yīng)用程序(3)
下一篇:Android2.2中系統(tǒng)自帶主題themes.xml的源代碼
沙發(fā)
發(fā)表于 2016-3-10 19:48 | 只看該作者 | 來(lái)自山東
很給力,ZNDS有你更精彩!

本版積分規(guī)則

Archiver|新帖|標(biāo)簽|軟件|Sitemap|ZNDS智能電視網(wǎng) ( 蘇ICP備2023012627號(hào) )

網(wǎng)絡(luò)信息服務(wù)信用承諾書(shū) | 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證:蘇B2-20221768 丨 蘇公網(wǎng)安備 32011402011373號(hào)

GMT+8, 2024-10-20 00:43 , Processed in 0.061636 second(s), 15 queries , Redis On.

Powered by Discuz!

監(jiān)督舉報(bào):report#znds.com (請(qǐng)將#替換為@)

© 2007-2024 ZNDS.Com

快速回復(fù) 返回頂部 返回列表