ViewGroup.MarginLayoutParams.SetMargins(Int32, Int32, Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定邊界,以像素為單位。
[Android.Runtime.Register("setMargins", "(IIII)V", "GetSetMargins_IIIIHandler")]
public virtual void SetMargins(int left, int top, int right, int bottom);
[<Android.Runtime.Register("setMargins", "(IIII)V", "GetSetMargins_IIIIHandler")>]
abstract member SetMargins : int * int * int * int -> unit
override this.SetMargins : int * int * int * int -> unit
參數
- left
- Int32
左邊界大小
- top
- Int32
頂邊距尺寸
- right
- Int32
右邊界尺寸
- bottom
- Int32
底部邊距尺寸
- 屬性
備註
設定邊界,以像素為單位。 必須打電話 android.view.View#requestLayout() 給新邊際,才能納入考量。 根據版面方向,左右邊距可能會被覆蓋 android.view.View#requestLayout() 。 利潤率應為正值。
Java 文件 android.view.ViewGroup.MarginLayoutParams.setMargins(int, int, int, int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。