W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
幫助您使用 Intent 設(shè)置當(dāng)前應(yīng)用程序的窗口屬性。
此類將窗口的填充設(shè)置封裝在 Intent 中,并且您無需關(guān)心數(shù)據(jù)的存儲(chǔ)方式。
建設(shè)者 | 描述 |
---|---|
WindowAttributeHelper(Intent intentAttribute) | 用于創(chuàng)建 WindowAttributeHelper 實(shí)例的參數(shù)化構(gòu)造函數(shù)。 |
修飾符和類型 | 方法 | 描述 |
---|---|---|
Ability.WindowAttributeHelpe | setBottomPadding(int 底部) | 設(shè)置窗口的底部填充。 |
Ability.WindowAttributeHelper | setLeftPadding(向左整數(shù)) | 設(shè)置窗口的左填充。 |
Ability.WindowAttributeHelper | setRightPadding(int 右) | 設(shè)置窗口的右填充。 |
Ability.WindowAttributeHelper | setTopPadding(int 頂部) | 設(shè)置窗口的頂部填充。 |
從類 java.lang 繼承的方法。object |
---|
clone,equals,finalize,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait |
public WindowAttributeHelper(Intent intentAttribute)
用于創(chuàng)建 WindowAttributeHelper 實(shí)例的參數(shù)化構(gòu)造函數(shù)。
調(diào)用 WindowAttributeHelper 提供的設(shè)置方法后,實(shí)例中攜帶的 Intent 將自動(dòng)存儲(chǔ)屬性設(shè)置。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
intentAttribute | 指示用于存儲(chǔ)窗口屬性的 Intent。 |
public Ability.WindowAttributeHelper setLeftPadding(int left)
設(shè)置窗口的左填充。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
剩下 | 指示要設(shè)置的窗口的左填充(以像素為單位) |
返回值:
返回具有指定左填充的 WindowAttributeHelper 對(duì)象。
public Ability.WindowAttributeHelper setTopPadding(int top)
設(shè)置窗口的頂部填充。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
最佳 | 指示要設(shè)置的窗口的頂部填充,以像素為單位 |
返回值:
返回具有指定頂部填充的 WindowAttributeHelper 對(duì)象。
public Ability.WindowAttributeHelper setRightPadding(int right)
設(shè)置窗口的右填充。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
對(duì) | 指示要設(shè)置的窗口的右填充,以像素為單位 |
返回值:
返回具有指定右填充的 WindowAttributeHelper 對(duì)象。
public Ability.WindowAttributeHelper setBottomPadding(int bottom)
設(shè)置窗口的底部填充。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
底部 | 指示要設(shè)置的窗口的底部填充,以像素為單位。 |
返回值:
返回具有指定底部填充的 WindowAttributeHelper 對(duì)象。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: