List of usage examples for android.view SurfaceView setBackgroundColor
@RemotableViewMethod public void setBackgroundColor(@ColorInt int color)
From source file:org.blanco.lacuenta.misc.EmptyFragment.java
@Override public View getView() { SurfaceView v = new SurfaceView(getActivity()); v.setBackgroundColor(Color.BLUE); return v;// ww w . j a v a 2 s . c o m }
From source file:ti.map.TiUIMapView.java
/** * Traverses through the view hierarchy to locate the SurfaceView and set * the background to transparent.//from w w w . j a va 2s. c o m * * @param v * the root view */ private void setBackgroundTransparent(View v) { if (v instanceof SurfaceView) { SurfaceView sv = (SurfaceView) v; sv.setBackgroundColor(Color.TRANSPARENT); } if (v instanceof ViewGroup) { ViewGroup viewGroup = (ViewGroup) v; for (int i = 0; i < viewGroup.getChildCount(); i++) { setBackgroundTransparent(viewGroup.getChildAt(i)); } } }