本文整理汇总了Java中org.solovyev.android.checkout.Checkout.forActivity方法的典型用法代码示例。如果您正苦于以下问题:Java Checkout.forActivity方法的具体用法?Java Checkout.forActivity怎么用?Java Checkout.forActivity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.solovyev.android.checkout.Checkout
的用法示例。
在下文中一共展示了Checkout.forActivity方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: function
import org.solovyev.android.checkout.Checkout; //导入方法依赖的package包/类
@Override
protected void function() {
final Adapter adapter = new Adapter();
mInventoryCallback = new InventoryCallback(adapter);
String ateKey = Helper.getATEKey(this);
int colorAccent = Config.accentColor(this, ateKey);
rv.setPopupBgColor(colorAccent);
rv.setItemAnimator(new DefaultItemAnimator());
CustomLayoutManager customLayoutManager = new CustomLayoutManager(this);
customLayoutManager.setSmoothScrollbarEnabled(true);
rv.setLayoutManager(customLayoutManager);
rv.addItemDecoration(new DividerItemDecoration(this, 75, false));
rv.setHasFixedSize(true);
rv.setAdapter(adapter);
final Billing billing = MusicXApplication.get(this).getmBilling();
mCheckout = Checkout.forActivity(this, billing);
mCheckout.start();
reloadInventory();
}
示例2: onCreate
import org.solovyev.android.checkout.Checkout; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
if (mCheckoutRequest) {
App.getCheckoutInternal().requestConnect();
mCheckout = Checkout.forActivity(this, App.getCheckout());
}
mPowerSaveDetector = PowerSaveDetector.newInstance(this);
super.onCreate(savedInstanceState);
}
示例3: onCreate
import org.solovyev.android.checkout.Checkout; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
if (mCheckoutRequest) mCheckout = Checkout.forActivity(this, getCheckoutInternal().getCheckout());
super.onCreate(savedInstanceState);
}
示例4: onCreate
import org.solovyev.android.checkout.Checkout; //导入方法依赖的package包/类
void onCreate(Activity activity, Bundle savedInstanceState) {
if (mCheckoutRequest) mCheckout = Checkout.forActivity(activity, AppHeap.getCheckout());
mPowerSaveDetector = PowerSaveDetector.newInstance(activity);
mActivity = activity;
mCreated = true;
}
示例5: onCreate
import org.solovyev.android.checkout.Checkout; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initialize preferences
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
// Initialize tutorial
if(Configuration.getPrefFirstTimeRun()) {
Log.d(this.getClass().getName(), "First time app running, launching tutorial.");
showAppUsage();
}
// Initialize jobs
jobManager = BakerApplication.getInstance().getJobManager();
EventBus.getDefault().register(this);
// Initialize issue collection
issueCollection = BakerApplication.getInstance().getIssueCollection();
// Initialize issue adapter for shelf view
issueAdapter = new IssueAdapter(this, issueCollection);
// Render View
this.setContentView(R.layout.shelf_activity);
// Initialize Features
setupHeader();
loadBackground();
setupSwipeLayout();
setupActionBar();
setupCategoryDrawer();
// Fade in animation
View view = findViewById(android.R.id.content);
Animation mLoadAnimation = AnimationUtils.loadAnimation(getApplicationContext(), android.R.anim.fade_in);
mLoadAnimation.setDuration(2000);
view.startAnimation(mLoadAnimation);
// Initialize shelf view
shelfView = (ShelfView) findViewById(R.id.shelf_view);
shelfView.setAdapter(issueAdapter);
issueAdapter.updateIssues();
// Update category drawer
updateCategoryDrawer(issueCollection.getCategories(), issueAdapter.getCategoryIndex());
// Continue downloads
unzipPendingPackages();
// Checkout
if(!Configuration.isStandaloneMode()) {
shelfCheckout = Checkout.forActivity(this, BakerApplication.getInstance().getCheckout());
shelfCheckout.start();
shelfCheckout.createPurchaseFlow(SHELF_CHECKOUT_REQUEST_CODE, new PurchaseListener());
}
// Plugin Callback
BakerApplication.getInstance().getPluginManager().onShelfActivityCreated(this);
}