com.google.android.gms.cast.framework.IntroductoryOverlay Java Examples
The following examples show how to use
com.google.android.gms.cast.framework.IntroductoryOverlay.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VideoBrowserActivity.java From CastVideos-android with Apache License 2.0 | 6 votes |
private void showIntroductoryOverlay() { if (mIntroductoryOverlay != null) { mIntroductoryOverlay.remove(); } if ((mediaRouteMenuItem != null) && mediaRouteMenuItem.isVisible()) { new Handler().post(new Runnable() { @Override public void run() { mIntroductoryOverlay = new IntroductoryOverlay.Builder( VideoBrowserActivity.this, mediaRouteMenuItem) .setTitleText(getString(R.string.introducing_cast)) .setOverlayColor(R.color.primary) .setSingleTime() .setOnOverlayDismissedListener( new IntroductoryOverlay.OnOverlayDismissedListener() { @Override public void onOverlayDismissed() { mIntroductoryOverlay = null; } }) .build(); mIntroductoryOverlay.show(); } }); } }
Example #2
Source File: VideoBrowserActivity.java From cast-videos-android with Apache License 2.0 | 6 votes |
private void showIntroductoryOverlay() { if (mIntroductoryOverlay != null) { mIntroductoryOverlay.remove(); } if ((mediaRouteMenuItem != null) && mediaRouteMenuItem.isVisible()) { new Handler().post(new Runnable() { @Override public void run() { mIntroductoryOverlay = new IntroductoryOverlay.Builder( VideoBrowserActivity.this, mediaRouteMenuItem) .setTitleText("Introducing Cast") .setSingleTime() .setOnOverlayDismissedListener( new IntroductoryOverlay.OnOverlayDismissedListener() { @Override public void onOverlayDismissed() { mIntroductoryOverlay = null; } }) .build(); mIntroductoryOverlay.show(); } }); } }
Example #3
Source File: ChromeCastSettingFragmentActivity.java From DeviceConnect-Android with MIT License | 6 votes |
/** * 説明を表示. */ private void showIntroductoryOverlay() { if (mIntroductoryOverlay != null) { mIntroductoryOverlay.remove(); } new Handler().postDelayed(() -> { if ((mediaRouteMenuItem != null) && mediaRouteMenuItem.isVisible()) { mIntroductoryOverlay = new IntroductoryOverlay.Builder( ChromeCastSettingFragmentActivity.this, mediaRouteMenuItem) .setTitleText(getString(R.string.introducing_cast)) .setOverlayColor(R.color.primary) .setSingleTime() .setOnOverlayDismissedListener( () -> { mIntroductoryOverlay = null; }) .build(); mIntroductoryOverlay.show(); } }, 500); }
Example #4
Source File: WatchLaterVideosFragment.java From Loop with Apache License 2.0 | 6 votes |
private void showIntroductoryOverlay() { if (introductoryOverlay != null) { introductoryOverlay.remove(); } if ((mediaRouteMenuItem != null) && mediaRouteMenuItem.isVisible()) { new Handler().post(new Runnable() { @Override public void run() { introductoryOverlay = new IntroductoryOverlay.Builder( getActivity(), mediaRouteMenuItem) .setTitleText("Touch to cast videos to your TV") .setSingleTime() .setOnOverlayDismissedListener( new IntroductoryOverlay.OnOverlayDismissedListener() { @Override public void onOverlayDismissed() { introductoryOverlay = null; } }) .build(); introductoryOverlay.show(); } }); } }
Example #5
Source File: GoogleCastDelegate.java From edx-app-android with Apache License 2.0 | 6 votes |
public void showIntroductoryOverlay(@NonNull Activity activity, @Nullable final MenuItem mediaRouteMenuItem) { if (castContext.getCastState() != CastState.NO_DEVICES_AVAILABLE) { if (introductoryOverlay != null) { introductoryOverlay.remove(); } if (mediaRouteMenuItem != null && mediaRouteMenuItem.isVisible()) { new Handler().post(() -> { introductoryOverlay = new IntroductoryOverlay.Builder( activity, mediaRouteMenuItem) .setTitleText(context.getString(R.string.introducing_cast_text)) .setSingleTime() .setOnOverlayDismissedListener( () -> introductoryOverlay = null) .build(); introductoryOverlay.show(); }); } } }
Example #6
Source File: MainActivity.java From AndroidDemoProjects with Apache License 2.0 | 6 votes |
private void showIntroductoryOverlay() { if (mIntroductoryOverlay != null) { mIntroductoryOverlay.remove(); } if ((mMediaRouterButton != null) && mMediaRouterButton.isVisible()) { new Handler().post(new Runnable() { @Override public void run() { mIntroductoryOverlay = new IntroductoryOverlay.Builder( MainActivity.this, mMediaRouterButton) .setTitleText("Introduction text") .setOverlayColor(R.color.colorPrimary) .setSingleTime() .setOnOverlayDismissedListener( new IntroductoryOverlay.OnOverlayDismissedListener() { @Override public void onOverlayDismissed() { mIntroductoryOverlay = null; } }) .build(); mIntroductoryOverlay.show(); } }); } }
Example #7
Source File: Casty.java From Casty with MIT License | 4 votes |
private IntroductoryOverlay createIntroductionOverlay(MenuItem menuItem) { return new IntroductoryOverlay.Builder(activity, menuItem) .setTitleText(R.string.casty_introduction_text) .setSingleTime() .build(); }