本文整理了Java中android.view.SurfaceView.setBackgroundColor()
方法的一些代码示例,展示了SurfaceView.setBackgroundColor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SurfaceView.setBackgroundColor()
方法的具体详情如下:
包路径:android.view.SurfaceView
类名称:SurfaceView
方法名:setBackgroundColor
暂无
代码示例来源:origin: SwiftyWang/FingerColoring-Android
@Override
public void setBackgroundColor(int color) {
super.setBackgroundColor(color);
}
代码示例来源:origin: stkent/bugshaker-android
@Override
protected void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_surface_view);
final SurfaceView surfaceView = (SurfaceView) findViewById(R.id.surface_view);
surfaceView.setBackgroundColor(Color.RED);
}
代码示例来源:origin: FauDroids/Bored-Rudolf
public GameView(Context context) {
super(context);
addView(
LayoutInflater.from(getContext()).inflate(R.layout.game_view, null),
new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
this.gameManager = new GameManager(getContext());
this.surfaceView = (SurfaceView) findViewById(R.id.surface_view);
this.scoreView = (TextView) findViewById(R.id.txt_score);
this.highScoreView = (TextView) findViewById(R.id.txt_high_score);
this.whiteView = findViewById(R.id.view_white);
this.downArrowView = (ImageView) findViewById(R.id.img_arrow_down);
this.arrowFadeOutAnim = AnimationUtils.loadAnimation(context, R.anim.arrow_fade_out);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
surfaceHolder.addCallback(this);
surfaceHolder.setFormat(PixelFormat.TRANSPARENT);
surfaceView.setBackgroundColor(Color.TRANSPARENT);
surfaceView.setZOrderOnTop(true);
}
代码示例来源:origin: zxfnicholas/CameraSDK
surfaceHolder.setKeepScreenOn(true);
surfaceView.setFocusable(true);
surfaceView.setBackgroundColor(TRIM_MEMORY_BACKGROUND);
surfaceView.getHolder().addCallback(new SurfaceCallback());//为SurfaceView的句柄添加一个回调函数
内容来源于网络,如有侵权,请联系作者删除!