本文整理了Java中android.view.SurfaceView.setZOrderOnTop()
方法的一些代码示例,展示了SurfaceView.setZOrderOnTop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SurfaceView.setZOrderOnTop()
方法的具体详情如下:
包路径:android.view.SurfaceView
类名称:SurfaceView
方法名:setZOrderOnTop
暂无
代码示例来源:origin: stackoverflow.com
SurfaceView sfvTrack = (SurfaceView)findViewById(R.id.sfvTrack);
sfvTrack.setZOrderOnTop(true); // necessary
SurfaceHolder sfhTrackHolder = sfvTrack.getHolder();
sfhTrackHolder.setFormat(PixelFormat.TRANSPARENT);
代码示例来源:origin: stackoverflow.com
SurfaceView preview=(SurfaceView)findViewById(R.id.preview);
preview.setZOrderOnTop(false);
代码示例来源:origin: stackoverflow.com
AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
cfg.r = cfg.g = cfg.b = cfg.a = 8;
cfg.useGL20 = false;
View view = initializeForView(new LineDrawing(), cfg);
if (graphics.getView() instanceof SurfaceView) {
SurfaceView glView = (SurfaceView) graphics.getView();
glView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
glView.setZOrderOnTop(true);
}
代码示例来源:origin: stackoverflow.com
SurfaceHolder holder = getHolder();
holder.addCallback(this);
SurfaceView sur = (SurfaceView)findViewById(R.id.surfaceview);
sur.setZOrderOnTop(true); // necessary
holder = sur.getHolder();
holder.setFormat(PixelFormat.TRANSPARENT);
代码示例来源:origin: stackoverflow.com
SurfaceView surface = (SurfaceView)findViewById(R.id.your_surface_view);
surface.setZOrderOnTop(true);
SurfaceHolder surfaceHolder = surface.getHolder();
surfaceHolder.setFormat(PixelFormat.TRANSPARENT);
代码示例来源:origin: stackoverflow.com
SurfaceView sfvTrack = (SurfaceView)findViewById(R.id.sfvTrack);
sfvTrack.setZOrderOnTop(true); // necessary
SurfaceHolder sfhTrackHolder = sfvTrack.getHolder();
sfhTrackHolder.setFormat(PixelFormat.TRANSPARENT);
代码示例来源:origin: stackoverflow.com
import android.view.SurfaceHolder;
import android.view.SurfaceView;
public class HomeFragment extends FragmentBase {
private SurfaceView sview;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
//this fixes google maps surface view black screen animation issue
sview = new SurfaceView(getActivity());
sview.setZOrderOnTop(true); // necessary
SurfaceHolder holder = sview.getHolder();
holder.setFormat(PixelFormat.TRANSPARENT);
container.addView(sview, 0);
...
}
代码示例来源:origin: stackoverflow.com
// Setup your SurfaceView
SurfaceView surfaceView = ...; // use any SurfaceView you want
surfaceView.setZOrderOnTop(true);
surfaceView.getHolder().setFormat(PixelFormat.TRANSPARENT);
// Setup your ImageView
ImageView bgImagePanel = new ImageView(context);
bgImagePanel.setBackgroundDrawable(...); // use any Bitmap or BitmapDrawable you want
// Use a RelativeLayout to overlap both SurfaceView and ImageView
RelativeLayout.LayoutParams fillParentLayout = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);
RelativeLayout rootPanel = new RelativeLayout(context);
rootPanel.setLayoutParams(fillParentLayout);
rootPanel.addView(surfaceView, fillParentLayout);
rootPanel.addView(bgImagePanel, fillParentLayout);
代码示例来源:origin: vbier/habpanelviewer
public MotionVisualizer(SurfaceView motionView, NavigationView navigationView, SharedPreferences preferences, int cameraRotation, int scaledSize) {
mMotionView = motionView;
mNavigationView = navigationView;
mPreferences = preferences;
mCameraRotation = cameraRotation;
int newDeviceRotation = ((Activity) mMotionView.getContext()).getWindowManager().getDefaultDisplay().getRotation();
setDeviceRotation(newDeviceRotation);
mMotionView.setZOrderOnTop(true);
mMotionView.getHolder().setFormat(PixelFormat.TRANSPARENT);
mPaint.setColor(Color.WHITE);
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setTextSize(scaledSize);
Rect bounds = new Rect();
mPaint.getTextBounds(mNavigationView.getContext().getString(R.string.motion), 0, 6, bounds);
mMotionTextWidth = bounds.width();
mPaint.getTextBounds(mNavigationView.getContext().getString(R.string.tooDark), 0, 8, bounds);
mDarkTextWidth = bounds.width();
}
代码示例来源:origin: sealtalk/sealtalk-android
@Override
public void onClick(View v) {
try {
SurfaceView fromView = (SurfaceView) mSPreviewContainer.getChildAt(0);
SurfaceView toView = (SurfaceView) mLPreviewContainer.getChildAt(0);
mLPreviewContainer.removeAllViews();
mSPreviewContainer.removeAllViews();
fromView.setZOrderOnTop(false);
fromView.setZOrderMediaOverlay(false);
mLPreviewContainer.addView(fromView);
toView.setZOrderOnTop(true);
toView.setZOrderMediaOverlay(true);
mSPreviewContainer.addView(toView);
if(null!= fromView.getTag() && !TextUtils.isEmpty(fromView.getTag().toString())){
UserInfo userInfo = RongContext.getInstance().getUserInfoFromCache(fromView.getTag().toString());
TextView userName = (TextView) mUserInfoContainer.findViewById(R.id.rc_voip_user_name);
userName.setText(userInfo.getName());
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
代码示例来源: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: tony-Shx/Swface
mFaceSurface.setZOrderOnTop(true);
mFaceSurface.getHolder().setFormat(PixelFormat.TRANSLUCENT);
代码示例来源:origin: chartsai/ServiceCamera
sv.setZOrderOnTop(true);
sh.setFormat(PixelFormat.TRANSPARENT);
代码示例来源:origin: sealtalk/sealtalk-android
localView.setZOrderOnTop(false);
localView.setZOrderMediaOverlay(false);
localViewContainer.addView(localView);
代码示例来源:origin: sealtalk/sealtalk-android
fromView.setZOrderOnTop(false);
fromView.setZOrderMediaOverlay(false);
toSurfaceView.setZOrderOnTop(true);
toSurfaceView.setZOrderMediaOverlay(true);
toSurfaceView.setTag(CallKitUtils.getStitchedContent(to, REMOTE_FURFACEVIEW_TAG));
代码示例来源:origin: sealtalk/sealtalk-android
if (mLocalVideo != null) {
mLocalVideo.setZOrderMediaOverlay(true);
mLocalVideo.setZOrderOnTop(true);
mSPreviewContainer.addView(mLocalVideo);
内容来源于网络,如有侵权,请联系作者删除!