本文整理汇总了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);
}
示例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);
}
});
}