pub trait SurfaceHolder_Callback2:
SurfaceHolder_Callback
+ JObjRef
+ JObjNew
+ PartialEq
+ Debug {
const CLASS: &'static str = "android/view/SurfaceHolder$Callback2";
const OBJECT_SIG: &'static str = "Landroid/view/SurfaceHolder$Callback2;";
const DIM: u8 = 0u8;
// Required method
fn surface_redraw_needed<SH: SurfaceHolder>(&self, holder: &SH);
}
Expand description
客户端可以实现此接口来接收有关表面更改的信息。与 SurfaceView 一起使用时,被保留的 Surface 仅在调用 surfaceCreated(SurfaceHolder) 和 surfaceDestroyed(SurfaceHolder) 之间可用。 回调使用 SurfaceHolder.addCallback 方法设置。
Provided Associated Constants§
Sourceconst CLASS: &'static str = "android/view/SurfaceHolder$Callback2"
const CLASS: &'static str = "android/view/SurfaceHolder$Callback2"
android/view/SurfaceHolder$Callback2
Sourceconst OBJECT_SIG: &'static str = "Landroid/view/SurfaceHolder$Callback2;"
const OBJECT_SIG: &'static str = "Landroid/view/SurfaceHolder$Callback2;"
Landroid/view/SurfaceHolder$Callback2;
Required Methods§
Sourcefn surface_redraw_needed<SH: SurfaceHolder>(&self, holder: &SH)
fn surface_redraw_needed<SH: SurfaceHolder>(&self, holder: &SH)
当应用程序需要重绘其表面的内容时调用,在调整其大小后或出于其他原因。通过在重绘完成之前不从此处返回,您可以确保用户不会看到处于不良状态的表面(在以新大小正确绘制之前)。
这通常会先调用surfaceChanged。从O开始,可以实现surfaceRedrawNeededAsync以提供非阻塞实现。如果未实现surfaceRedrawNeededAsync,则将改为调用此方法。
holder
其表面已更改的SurfaceHolder。
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.