語言

PopupWindow.Update 方法

定義

多載

名稱 Description
Update()

如果彈出視窗正在顯示,會從目前設定的狀態更新彈出視窗的狀態。

Update(Int32, Int32)

更新彈出視窗的尺寸。

Update(View, Int32, Int32)

更新彈出視窗的位置與尺寸。

Update(Int32, Int32, Int32, Int32)

更新彈出視窗的位置與尺寸。

Update(View, Int32, Int32, Int32, Int32)

更新彈出視窗的位置與尺寸。

Update(Int32, Int32, Int32, Int32, Boolean)

更新彈出視窗的位置與尺寸。

Update()

如果彈出視窗正在顯示,會從目前設定的狀態更新彈出視窗的狀態。

[Android.Runtime.Register("update", "()V", "GetUpdateHandler")]
public virtual void Update();
[<Android.Runtime.Register("update", "()V", "GetUpdateHandler")>]
abstract member Update : unit -> unit
override this.Update : unit -> unit
屬性

備註

如果彈出視窗正在顯示,會從目前設定的狀態更新彈出視窗的狀態。

包括:<ul><li>#setClippingEnabled(boolean)</li><li>#setFocusable(boolean)</li li><>/li#setIgnoreCheekPress()<li/li li><>/li#setInputMethodMode(int)<li/li><>#setTouchable(boolean)<><>#setAnimationStyle(int)<>< li/li li>#setTouchModal(boolean) (布林)}</li><li>#setIsClippedToScreen(boolean)</li></ul>

Java 文件 android.widget.PopupWindow.update()。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Update(Int32, Int32)

更新彈出視窗的尺寸。

[Android.Runtime.Register("update", "(II)V", "GetUpdate_IIHandler")]
public virtual void Update(int width, int height);
[<Android.Runtime.Register("update", "(II)V", "GetUpdate_IIHandler")>]
abstract member Update : int * int -> unit
override this.Update : int * int -> unit

參數

width
Int32

新的像素寬度必須是 >= 0 或 -1 才能忽略

height
Int32

新的高度(像素數)必須是 >= 0 或 -1 才能忽略

屬性

備註

更新彈出視窗的尺寸。

呼叫此函式同時也會更新視窗,呈現當前彈出狀態,如描述。#update()

Java 文件 android.widget.PopupWindow.update(int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Update(View, Int32, Int32)

更新彈出視窗的位置與尺寸。

[Android.Runtime.Register("update", "(Landroid/view/View;II)V", "GetUpdate_Landroid_view_View_IIHandler")]
public virtual void Update(Android.Views.View? anchor, int width, int height);
[<Android.Runtime.Register("update", "(Landroid/view/View;II)V", "GetUpdate_Landroid_view_View_IIHandler")>]
abstract member Update : Android.Views.View * int * int -> unit
override this.Update : Android.Views.View * int * int -> unit

參數

anchor
View

彈出視窗的錨點視圖

width
Int32

新的像素寬度必須是 >= 0 或 -1 才能忽略

height
Int32

新的高度(像素數)必須是 >= 0 或 -1 才能忽略

屬性

備註

更新彈出視窗的位置與尺寸。

呼叫此函式同時也會更新視窗,呈現當前彈出狀態,如描述。#update()

Java 文件 android.widget.PopupWindow.update(android.view.View, int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Update(Int32, Int32, Int32, Int32)

更新彈出視窗的位置與尺寸。

[Android.Runtime.Register("update", "(IIII)V", "GetUpdate_IIIIHandler")]
public virtual void Update(int x, int y, int width, int height);
[<Android.Runtime.Register("update", "(IIII)V", "GetUpdate_IIIIHandler")>]
abstract member Update : int * int * int * int -> unit
override this.Update : int * int * int * int -> unit

參數

x
Int32

新的X地點

y
Int32

新的Y地點

width
Int32

新的像素寬度必須是 >= 0 或 -1 才能忽略

height
Int32

新的高度(像素數)必須是 >= 0 或 -1 才能忽略

屬性

備註

更新彈出視窗的位置與尺寸。

寬度和高度可設定為 -1,僅更新位置。 呼叫此函式同時也會更新視窗,呈現當前彈出狀態,如描述。#update()

Java 文件 android.widget.PopupWindow.update(int, int, int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Update(View, Int32, Int32, Int32, Int32)

更新彈出視窗的位置與尺寸。

[Android.Runtime.Register("update", "(Landroid/view/View;IIII)V", "GetUpdate_Landroid_view_View_IIIIHandler")]
public virtual void Update(Android.Views.View? anchor, int xoff, int yoff, int width, int height);
[<Android.Runtime.Register("update", "(Landroid/view/View;IIII)V", "GetUpdate_Landroid_view_View_IIIIHandler")>]
abstract member Update : Android.Views.View * int * int * int * int -> unit
override this.Update : Android.Views.View * int * int * int * int -> unit

參數

anchor
View

彈出視窗的錨點視圖

xoff
Int32

X 位偏移於視圖左側邊緣

yoff
Int32

y 位偏移於視圖底部邊緣

width
Int32

新的像素寬度必須是 >= 0 或 -1 才能忽略

height
Int32

新的高度(像素數)必須是 >= 0 或 -1 才能忽略

屬性

備註

更新彈出視窗的位置與尺寸。

寬度和高度可設定為 -1,僅更新位置。 呼叫此函式同時也會更新視窗,呈現當前彈出狀態,如描述。#update()

如果視圖後來捲動移動到 anchor 不同位置,彈出視窗也會相應移動。

Java 文件 android.widget.PopupWindow.update(android.view.View, int, int, int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Update(Int32, Int32, Int32, Int32, Boolean)

更新彈出視窗的位置與尺寸。

[Android.Runtime.Register("update", "(IIIIZ)V", "GetUpdate_IIIIZHandler")]
public virtual void Update(int x, int y, int width, int height, bool force);
[<Android.Runtime.Register("update", "(IIIIZ)V", "GetUpdate_IIIIZHandler")>]
abstract member Update : int * int * int * int * bool -> unit
override this.Update : int * int * int * int * bool -> unit

參數

x
Int32

新的X地點

y
Int32

新的Y地點

width
Int32

新的像素寬度必須是 >= 0 或 -1 才能忽略

height
Int32

新的高度(像素數)必須是 >= 0 或 -1 才能忽略

force
Boolean

true 即使指定位置似乎已對應 LayoutParam,仍重新定位視窗, false 僅在必要時重新定位

屬性

備註

更新彈出視窗的位置與尺寸。

寬度和高度可設定為 -1,僅更新位置。 呼叫此函式同時也會更新視窗,呈現當前彈出狀態,如描述。#update()

Java 文件 android.widget.PopupWindow.update(int, int, int, int, boolean)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於