本文整理了Java中android.view.Window.takeSurface()
方法的一些代码示例,展示了Window.takeSurface()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.takeSurface()
方法的具体详情如下:
包路径:android.view.Window
类名称:Window
方法名:takeSurface
暂无
代码示例来源:origin: stackoverflow.com
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LocalActivityManager lam = getLocalActivityManager();
Intent intent = new Intent();
intent.setClass(this, TeapotNativeActivity.class);
Window window = lam.startActivity("xxx", intent);
// reflect call "willYouTakeTheSurface"
NativeActivity callback = JavaCalls.callMethod(window.getDecorView(), "willYouTakeTheSurface");
if (callback != null) {
window.takeSurface(null);
getWindow().takeSurface(callback);
getWindow().takeInputQueue(callback);
}
setContentView(window.getDecorView());
}
代码示例来源:origin: qiubiteme/android_api_demos
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Tell the activity's window that we want to do our own drawing
// to its surface. This prevents the view hierarchy from drawing to
// it, though we can still add views to capture input if desired.
getWindow().takeSurface(this);
// This is the thread that will be drawing to our surface.
mDrawingThread = new DrawingThread();
mDrawingThread.start();
}
代码示例来源:origin: THEONE10211024/ApiDemos
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Tell the activity's window that we want to do our own drawing
// to its surface. This prevents the view hierarchy from drawing to
// it, though we can still add views to capture input if desired.
getWindow().takeSurface(this);
// This is the thread that will be drawing to our surface.
mDrawingThread = new DrawingThread();
mDrawingThread.start();
}
内容来源于网络,如有侵权,请联系作者删除!