本文整理汇总了Java中org.sufficientlysecure.donations.DonationsFragment.newInstance方法的典型用法代码示例。如果您正苦于以下问题:Java DonationsFragment.newInstance方法的具体用法?Java DonationsFragment.newInstance怎么用?Java DonationsFragment.newInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sufficientlysecure.donations.DonationsFragment
的用法示例。
在下文中一共展示了DonationsFragment.newInstance方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import org.sufficientlysecure.donations.DonationsFragment; //导入方法依赖的package包/类
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.GdxTheme);
setContentView(R.layout.donations_activity);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
if (BuildConfig.DONATIONS_GOOGLE) {
donationsFragment = DonationsFragment.newInstance(BuildConfig.DEBUG, true, GOOGLE_PUBKEY, GOOGLE_CATALOG,
getResources().getStringArray(R.array.donation_google_catalog_values), false, null, null,
null, false, null, null, false, null);
}
ft.replace(R.id.donations_activity_container, donationsFragment, "donationsFragment");
ft.commit();
}
示例2: onCreate
import org.sufficientlysecure.donations.DonationsFragment; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_donate);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
try {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} catch (NullPointerException e) {
/* empty */
}
getSupportActionBar().setTitle(R.string.donate_activity_title);
DonationsFragment fragment = (DonationsFragment) getSupportFragmentManager().findFragmentByTag("donationsFragment");
if (fragment == null) {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
fragment = DonationsFragment.newInstance(BuildConfig.DEBUG,
true, BuildConfig.GOOGLE_PLAY_PUBKEY, GOOGLE_PLAY_CATALOG, GOOGLE_PLAY_COST,
false, null, null, null,
false, null, null,
false, null);
ft.replace(R.id.donate_fragment, fragment, "donationsFragment");
ft.commit();
}
}
示例3: onCreate
import org.sufficientlysecure.donations.DonationsFragment; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_donate);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
try {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} catch (NullPointerException e) {
/* empty */
}
getSupportActionBar().setTitle(R.string.donate_activity_title);
DonationsFragment fragment = (DonationsFragment) getSupportFragmentManager().findFragmentByTag("donationsFragment");
if (fragment == null) {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
fragment = DonationsFragment.newInstance(BuildConfig.DEBUG,
false, null, null, null,
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, fragment, "donationsFragment");
ft.commit();
}
}
示例4: onCreate
import org.sufficientlysecure.donations.DonationsFragment; //导入方法依赖的package包/类
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.donations_activity);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
DonationsFragment donationsFragment;
donationsFragment = DonationsFragment.newInstance(false, true, GOOGLE_PUBKEY, GOOGLE_CATALOG,
getResources().getStringArray(R.array.donation_google_catalog_values), false, null, null,
null, false, null, null, false, null);
ft.replace(R.id.donations_activity_container, donationsFragment, "donationsFragment");
ft.commit();
}
示例5: onCreate
import org.sufficientlysecure.donations.DonationsFragment; //导入方法依赖的package包/类
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.donations_activity);
setupActionBar();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
DonationsFragment donationsFragment;
if (BuildConfig.DONATIONS_GOOGLE) {
donationsFragment = DonationsFragment.newInstance(BuildConfig.DEBUG, true, GOOGLE_PUBKEY, GOOGLE_CATALOG,
getResources().getStringArray(R.array.donation_google_catalog_values), true, PAYPAL_USER, PAYPAL_CURRENCY_CODE,
getString(R.string.donation_paypal_item), true, FLATTR_PROJECT_URL, FLATTR_URL, false, null);
} else {
donationsFragment = DonationsFragment.newInstance(BuildConfig.DEBUG, false, null, null, null, true, PAYPAL_USER,
PAYPAL_CURRENCY_CODE, getString(R.string.donation_paypal_item), true, FLATTR_PROJECT_URL, FLATTR_URL, false, null);
}
ft.replace(R.id.donations_activity_container, donationsFragment, "donationsFragment");
ft.commit();
}
示例6: refresh
import org.sufficientlysecure.donations.DonationsFragment; //导入方法依赖的package包/类
@Override
public void refresh(StoreActivity activity, FrameLayout titleBackContainer) {
if (mFragment == null) {
mFragment = DonationsFragment.newInstance(false, true, StoreActivity.GOOGLE_PUBKEY,
GOOGLE_CATALOG,
getResources().getStringArray(R.array.donation_google_catalog_values), false, null, null,
null, true, FLATTR_PROJECT_URL, FLATTR_URL, true, BITCOIN_ADDRESS);
}
FragmentTransaction t = activity.getSupportFragmentManager().beginTransaction();
t.replace(R.id.store_container, mFragment, FRAGMENT_TAG);
t.commit();
requestLayout();
invalidate();
mStartedTime = System.currentTimeMillis();
}
示例7: onCreate
import org.sufficientlysecure.donations.DonationsFragment; //导入方法依赖的package包/类
@Override
protected void onCreate (Bundle savedInstanceState)
{
super.onCreate (savedInstanceState);
setContentView (R.layout.activity_contribute);
FragmentTransaction fragmentTransaction = this.getSupportFragmentManager ().beginTransaction ();
// I know I'm supposed to keep my key hidden but... come on. This app is open source, and donations don't unlock any additional features. If they want to circumvent it they can easily do so, and they would gain absolutely nothing from it anyway. //
DonationsFragment donationsFragment = DonationsFragment.newInstance (false, true, "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAogL8ClXWCd9fMZrDISjCN0Dtzv5E06CAZpRihm2QH6vMP64mCMkTPUb/0ti4kIwyO3OVO7uJYLgdmHnGLyjuACknRrlVD94IzQLlwRMtSyhZClhLEsaKJEUl4CM2l6ZKgdxBJNYFnRRWcnYCo5n5e5UagPcXirPPXidsxj3OYe6bLHXP27uECB6h6yeq2XU4Rs9VejgC+5BYyPB5N7xbsVBMD8k2ym8EO1qGzJoXlkUS9pS5To5pO7/1tUZRAw0eXtNoO4p/LjF8HkLuN0GhnqL3cjjxIy2S/rC+3ypWDqo1ndoLRbYRMbPTxkbZ0a8MIXW36yXw/iSZfospi5/d/QIDAQAB", IAP_CATALOG, IAP_CATALOG_VALUES, false, null, null, null, false, null, null, false, null);
fragmentTransaction.replace (R.id.flDonate, donationsFragment, "donationsFragment");
fragmentTransaction.commit ();
}