当前位置: 首页>>代码示例>>Java>>正文


Java SurfaceView.setVisibility方法代码示例

本文整理汇总了Java中android.view.SurfaceView.setVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java SurfaceView.setVisibility方法的具体用法?Java SurfaceView.setVisibility怎么用?Java SurfaceView.setVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.view.SurfaceView的用法示例。


在下文中一共展示了SurfaceView.setVisibility方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SurfaceController

import android.view.SurfaceView; //导入方法依赖的package包/类
public SurfaceController(View rootView) {
    ViewGroup mLp = (ViewGroup)rootView;
 
    mEffectView =  (TextureView) mLp.findViewById(R.id.gl_surface_view);
    mSurfaceView =  (SurfaceView) mLp.findViewById(R.id.surface_view);
    if (mEffectEnable) {
        mView = mEffectView;
        mSurfaceView.setVisibility(View.GONE);
     } else {
         mView = mSurfaceView;
         mEffectView.setVisibility(View.GONE);
    }
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:14,代码来源:SurfaceController.java

示例2: onCreate

import android.view.SurfaceView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    SimpleExoPlayerView playerView = findViewById(R.id.player_view);
    SimpleExoPlayerView previewPlayerView
            = findViewById(R.id.previewPlayerView);
    previewTimeBar = playerView.findViewById(R.id.exo_progress);
    previewTimeBarLayout = findViewById(R.id.previewSeekBarLayout);


    previewTimeBarLayout.setTintColorResource(R.color.colorPrimary);

    previewTimeBar.addOnPreviewChangeListener(this);
    exoPlayerManager = new ExoPlayerManager(playerView, previewPlayerView, previewTimeBarLayout);
    exoPlayerManager.play(Uri.parse(getString(R.string.url_hls)));
    previewTimeBarLayout.setup(exoPlayerManager);

    View view = previewPlayerView.getVideoSurfaceView();

    if (view instanceof SurfaceView) {
        SurfaceView surfaceView = (SurfaceView) view;
        surfaceView.setZOrderMediaOverlay(true);
        surfaceView.setZOrderOnTop(true);
        surfaceView.setVisibility(View.INVISIBLE);
    }

    requestFullScreenIfLandscape();
}
 
开发者ID:hongcwamazing,项目名称:PreviewSeekBar-master,代码行数:31,代码来源:MainActivity.java

示例3: initialise

import android.view.SurfaceView; //导入方法依赖的package包/类
@UiThread
private void initialise(@NonNull Context context, @NonNull final EegeoMapOptions eegeoMapOptions) {
    View view = LayoutInflater.from(context).inflate(R.layout.eegeo_mapview_internal, this);
    setClickable(true);
    setFocusable(true);

    m_eegeoNativeMapView = new EegeoNativeMapView(this, eegeoMapOptions);

    SurfaceView surfaceView = (SurfaceView) findViewById(R.id.surfaceView);
    surfaceView.getHolder().addCallback(new SurfaceHolderCallback());
    surfaceView.setVisibility(View.VISIBLE);

    m_mapViewTouchHandler = new MapViewTouchHandler(m_eegeoNativeMapView);
}
 
开发者ID:wrld3d,项目名称:android-api,代码行数:15,代码来源:MapView.java

示例4: onPictureInPictureModeChanged

import android.view.SurfaceView; //导入方法依赖的package包/类
@Override
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
    super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig);

    FrameLayout container = findViewById(R.id.local_video_view_container);
    SurfaceView surfaceView = (SurfaceView) container.getChildAt(0);

    surfaceView.setZOrderMediaOverlay(!isInPictureInPictureMode);
    surfaceView.setVisibility(isInPictureInPictureMode ? View.GONE : View.VISIBLE);
    container.setVisibility(isInPictureInPictureMode ? View.GONE : View.VISIBLE);
}
 
开发者ID:AgoraIO,项目名称:Agora-Picture-in-Picture-Android,代码行数:12,代码来源:VideoChatViewActivity.java

示例5: onCreateView

import android.view.SurfaceView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    final View v = inflater.inflate(R.layout.fragment_list, container, false);
    SurfaceView surfaceView = (SurfaceView) v.findViewById(R.id.surfaceView);
    surfaceView.setVisibility(View.GONE);
    LinearLayout spinner = (LinearLayout) v.findViewById(R.id.playlist_management);
    spinner.setVisibility(View.GONE);
    LinearLayout deleteRecent = (LinearLayout) v.findViewById(R.id.delete_recent_container);
    deleteRecent.setVisibility(View.GONE);

    int videoContainerHeight = SharedPrefs.getVideoContainerHeight(context);
    if(videoContainerHeight == 0) {
        Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                int height = SharedPrefs.getVideoContainerHeight(context);
                resizeVideoContainer(v, height);
            }
        }, 100);
    } else {
        resizeVideoContainer(v, videoContainerHeight);
    }


    videosFoundListView = (RecyclerView) v.findViewById(R.id.fragment_list_items);
    videosFoundListView.setLayoutManager(new LinearLayoutManager(context));
    loadingProgressBar = (ProgressBar) v.findViewById(R.id.fragment_progress_bar);
    videoListAdapter = new VideosAdapter(context, searchResultsList,"searchFragment");
    videoListAdapter.setOnItemEventsListener(this);
    videosFoundListView.setAdapter(videoListAdapter);

    //disable swipe to refresh for this tab
    v.findViewById(R.id.swipe_to_refresh).setEnabled(false);
    return v;
}
 
开发者ID:pawelpaszki,项目名称:youtube_background_android,代码行数:39,代码来源:SearchFragment.java


注:本文中的android.view.SurfaceView.setVisibility方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。