use of com.abewy.android.apps.klyph.fragment.DonateFragment in project Klyph by jonathangerbaud.
the class DonateActivity method onActivityResult.
/**
* Needed for Google Play In-app Billing. It uses
* startIntentSenderForResult(). The result is not propagated to the
* Fragment like in startActivityForResult(). Thus we need to propagate
* manually to our Fragment.
*
* @param requestCode
* @param resultCode
* @param data
*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
FragmentManager fragmentManager = getFragmentManager();
Fragment fragment = fragmentManager.findFragmentByTag("donationsFragment");
if (fragment != null) {
((DonateFragment) fragment).onActivityResult(requestCode, resultCode, data);
}
}
use of com.abewy.android.apps.klyph.fragment.DonateFragment in project Klyph by jonathangerbaud.
the class DonateActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.donate_activity_title);
FragmentTransaction ft = getFragmentManager().beginTransaction();
DonateFragment donationsFragment = DonateFragment.newInstance(false, GOOGLE_PUBKEY, GOOGLE_CATALOG, getResources().getStringArray(R.array.donate_google_catalog_values));
ft.replace(R.id.fragment_container, donationsFragment, "donationsFragment");
ft.commit();
}
Aggregations