當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。