本文整理汇总了Java中android.support.v7.app.MediaRouteChooserDialog类的典型用法代码示例。如果您正苦于以下问题:Java MediaRouteChooserDialog类的具体用法?Java MediaRouteChooserDialog怎么用?Java MediaRouteChooserDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MediaRouteChooserDialog类属于android.support.v7.app包,在下文中一共展示了MediaRouteChooserDialog类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreateChooserDialogFragment
import android.support.v7.app.MediaRouteChooserDialog; //导入依赖的package包/类
@Override
public MediaRouteChooserDialogFragment onCreateChooserDialogFragment() {
return new MediaRouteChooserDialogFragment() {
final SystemVisibilitySaver mVisibilitySaver = new SystemVisibilitySaver();
@Override
public MediaRouteChooserDialog onCreateChooserDialog(
Context context, Bundle savedInstanceState) {
mVisibilitySaver.saveSystemVisibility(getActivity());
return new MediaRouteChooserDialog(context);
}
@Override
public void onStop() {
super.onStop();
mVisibilitySaver.restoreSystemVisibility(getActivity());
}
};
}
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:20,代码来源:ChromeMediaRouteDialogFactory.java
示例2: onCreate
import android.support.v7.app.MediaRouteChooserDialog; //导入依赖的package包/类
@Override
@DebugLog
protected void onCreate(Bundle savedInstanceState) {
boolean light = getIntent().getBooleanExtra(RendererConstants.EXTRA_WANT_LIGHT_THEME, true);
setTheme(light ? R.style.CastThemeTranslucentLight : R.style.CastThemeTranslucentDark);
super.onCreate(savedInstanceState);
CastComponent parent = DaggerService.getDaggerComponent(getApplicationContext());
DevicePickerActivityComponent.FACTORY.call(parent).inject(this);
setResult(RESULT_CANCELED, new Intent());
//always reset route
mMediaRouter.selectRoute(mMediaRouter.getDefaultRoute());
final MediaRouteSelector selector = new MediaRouteSelector.Builder()
.addControlCategory(CastMediaControlIntent.categoryForCast(getString(R.string.cast_id)))
.build();
mCallback = new MediaRouterCallback();
mMediaRouter.addCallback(selector, mCallback, MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);
mDialog = new MediaRouteChooserDialog(this);
mDialog.setOnDismissListener(this);
mDialog.setRouteSelector(selector);
mDialog.show();
}
开发者ID:OpenSilk,项目名称:Orpheus,代码行数:27,代码来源:DevicePickerActivity.java
示例3: onCreateChooserDialog
import android.support.v7.app.MediaRouteChooserDialog; //导入依赖的package包/类
@Override
public MediaRouteChooserDialog onCreateChooserDialog(
Context context, Bundle savedInstanceState) {
mVisibilitySaver.saveSystemVisibility(getActivity());
mContext = context;
return new MediaRouteChooserDialog(context);
}
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:8,代码来源:MediaRouteChooserDialogFactory.java
示例4: onCreateChooserDialog
import android.support.v7.app.MediaRouteChooserDialog; //导入依赖的package包/类
@Override
public MediaRouteChooserDialog onCreateChooserDialog(Context context, Bundle savedInstanceState) {
return new MediaRouteChooserDialog(context);
}
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:5,代码来源:StreamFragment.java
示例5: onCreateChooserDialog
import android.support.v7.app.MediaRouteChooserDialog; //导入依赖的package包/类
@Override
public MediaRouteChooserDialog onCreateChooserDialog(Context context, Bundle savedInstanceState) {
return new MediaRouteChooserDialog(context, ThemeUtil.getThemeRes(context));
}
开发者ID:popeen,项目名称:Popeens-DSub,代码行数:5,代码来源:CustomMediaRouteChooserDialogFragment.java
注:本文中的android.support.v7.app.MediaRouteChooserDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论