Fix screen rotating bug in DonateActivity
This commit is contained in:
parent
46e84b607c
commit
cecfb9460e
2 changed files with 22 additions and 16 deletions
|
@ -45,15 +45,18 @@ public class DonateActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
getSupportActionBar().setTitle(R.string.donate_activity_title);
|
getSupportActionBar().setTitle(R.string.donate_activity_title);
|
||||||
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
DonationsFragment fragment = (DonationsFragment) getSupportFragmentManager().findFragmentByTag("donationsFragment");
|
||||||
DonationsFragment donationsFragment = DonationsFragment.newInstance(BuildConfig.DEBUG,
|
if (fragment == null) {
|
||||||
false, null, null, null,
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
true, BuildConfig.PAYPAL_USER, BuildConfig.PAYPAL_CURRENCY_CODE, getString(R.string.donation),
|
fragment = DonationsFragment.newInstance(BuildConfig.DEBUG,
|
||||||
false, null, null,
|
false, null, null, null,
|
||||||
true, BuildConfig.BITCOIN_ADDRESS);
|
true, BuildConfig.PAYPAL_USER, BuildConfig.PAYPAL_CURRENCY_CODE, getString(R.string.donation),
|
||||||
|
false, null, null,
|
||||||
|
true, BuildConfig.BITCOIN_ADDRESS);
|
||||||
|
|
||||||
ft.replace(R.id.donate_fragment, donationsFragment, "fragment");
|
ft.replace(R.id.donate_fragment, fragment, "donationsFragment");
|
||||||
ft.commit();
|
ft.commit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -53,15 +53,18 @@ public class DonateActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
getSupportActionBar().setTitle(R.string.donate_activity_title);
|
getSupportActionBar().setTitle(R.string.donate_activity_title);
|
||||||
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
DonationsFragment fragment = (DonationsFragment) getSupportFragmentManager().findFragmentByTag("donationsFragment");
|
||||||
DonationsFragment donationsFragment = DonationsFragment.newInstance(BuildConfig.DEBUG,
|
if (fragment == null) {
|
||||||
true, BuildConfig.GOOGLE_PLAY_PUBKEY, GOOGLE_PLAY_CATALOG, GOOGLE_PLAY_COST,
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
false, null, null, null,
|
fragment = DonationsFragment.newInstance(BuildConfig.DEBUG,
|
||||||
false, null, null,
|
true, BuildConfig.GOOGLE_PLAY_PUBKEY, GOOGLE_PLAY_CATALOG, GOOGLE_PLAY_COST,
|
||||||
false, null);
|
false, null, null, null,
|
||||||
|
false, null, null,
|
||||||
|
false, null);
|
||||||
|
|
||||||
ft.replace(R.id.donate_fragment, donationsFragment, "donationsFragment");
|
ft.replace(R.id.donate_fragment, fragment, "donationsFragment");
|
||||||
ft.commit();
|
ft.commit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue