本文整理汇总了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);
}
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}