本文整理了Java中android.view.MenuItem.setActionProvider()
方法的一些代码示例,展示了MenuItem.setActionProvider()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MenuItem.setActionProvider()
方法的具体详情如下:
包路径:android.view.MenuItem
类名称:MenuItem
方法名:setActionProvider
暂无
代码示例来源:origin: robolectric/robolectric
item = item.setOnMenuItemClickListener(null);
assertThat(item).isNotNull();
item = item.setActionProvider(null);
assertThat(item).isNotNull();
item = item.setActionView(0);
代码示例来源:origin: com.actionbarsherlock/actionbarsherlock
@Override
public MenuItem setActionProvider(ActionProvider actionProvider) {
mNativeItem.setActionProvider(new ActionProviderWrapper(actionProvider));
return this;
}
代码示例来源:origin: com.willowtreeapps/oak-demos
@Override
public MenuItem setActionProvider(ActionProvider actionProvider) {
mNativeItem.setActionProvider(new ActionProviderWrapper(actionProvider));
return this;
}
代码示例来源:origin: kingargyle/adt-leanback-support
public static void configureMenuItem(MenuItem item, Activity callingActivity, Intent intent) {
ActionProvider itemProvider = item.getActionProvider();
ShareActionProvider provider = null;
if (!(itemProvider instanceof ShareActionProvider)) {
provider = new ShareActionProvider(callingActivity);
} else {
provider = (ShareActionProvider) itemProvider;
}
provider.setShareHistoryFileName(HISTORY_FILENAME_PREFIX +
callingActivity.getClass().getName());
provider.setShareIntent(intent);
item.setActionProvider(provider);
}
}
代码示例来源:origin: com.google.android/support-v4
public static void configureMenuItem(MenuItem item, Activity callingActivity, Intent intent) {
ActionProvider itemProvider = item.getActionProvider();
ShareActionProvider provider = null;
if (!(itemProvider instanceof ShareActionProvider)) {
provider = new ShareActionProvider(callingActivity);
} else {
provider = (ShareActionProvider) itemProvider;
}
provider.setShareHistoryFileName(HISTORY_FILENAME_PREFIX +
callingActivity.getClass().getName());
provider.setShareIntent(intent);
item.setActionProvider(provider);
}
}
内容来源于网络,如有侵权,请联系作者删除!