本文整理汇总了Java中com.facebook.widget.PickerFragment类的典型用法代码示例。如果您正苦于以下问题:Java PickerFragment类的具体用法?Java PickerFragment怎么用?Java PickerFragment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PickerFragment类属于com.facebook.widget包,在下文中一共展示了PickerFragment类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: showPickerFragment
import com.facebook.widget.PickerFragment; //导入依赖的package包/类
private void showPickerFragment(PickerFragment<?> fragment) {
fragment.setOnErrorListener(new PickerFragment.OnErrorListener() {
@Override
public void onError(PickerFragment<?> pickerFragment, FacebookException error) {
String text = getString(R.string.exception, error.getMessage());
Toast toast = Toast.makeText(HelloFacebookSampleActivity.this, text, Toast.LENGTH_SHORT);
toast.show();
}
});
FragmentManager fm = getSupportFragmentManager();
fm.beginTransaction()
.replace(R.id.fragment_container, fragment)
.addToBackStack(null)
.commit();
controlsContainer.setVisibility(View.GONE);
// We want the fragment fully created so we can use it immediately.
fm.executePendingTransactions();
fragment.loadData(false);
}
开发者ID:theelookdeveloper,项目名称:CodePix-Android,代码行数:24,代码来源:HelloFacebookSampleActivity.java
示例2: setFriendPickerListeners
import com.facebook.widget.PickerFragment; //导入依赖的package包/类
private void setFriendPickerListeners(final FriendPickerFragment fragment) {
fragment.setOnDoneButtonClickedListener(new FriendPickerFragment.OnDoneButtonClickedListener() {
@Override
public void onDoneButtonClicked(PickerFragment<?> pickerFragment) {
onFriendPickerDone(fragment);
}
});
}
开发者ID:theelookdeveloper,项目名称:CodePix-Android,代码行数:9,代码来源:HelloFacebookSampleActivity.java
注:本文中的com.facebook.widget.PickerFragment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论