本文整理匯總了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;
}