use of com.facebook.share.model.ShareContent in project facebook-android-sdk by facebook.
the class FacebookActivity method getFragment.
protected Fragment getFragment() {
Intent intent = getIntent();
FragmentManager manager = getSupportFragmentManager();
Fragment fragment = manager.findFragmentByTag(FRAGMENT_TAG);
if (fragment == null) {
if (FacebookDialogFragment.TAG.equals(intent.getAction())) {
FacebookDialogFragment dialogFragment = new FacebookDialogFragment();
dialogFragment.setRetainInstance(true);
dialogFragment.show(manager, FRAGMENT_TAG);
fragment = dialogFragment;
} else if (DeviceShareDialogFragment.TAG.equals(intent.getAction())) {
DeviceShareDialogFragment dialogFragment = new DeviceShareDialogFragment();
dialogFragment.setRetainInstance(true);
dialogFragment.setShareContent((ShareContent) intent.getParcelableExtra("content"));
dialogFragment.show(manager, FRAGMENT_TAG);
fragment = dialogFragment;
} else {
fragment = new LoginFragment();
fragment.setRetainInstance(true);
manager.beginTransaction().add(R.id.com_facebook_fragment_container, fragment, FRAGMENT_TAG).commit();
}
}
return fragment;
}
Aggregations