@Override public InputDialog build() { return Platform.getPlatform().getInstance(InputDialog.class, this); } }
@Override public AlertDialog build() { return Platform.getPlatform().getInstance(AlertDialog.class, this); } }
@Override public ProgressDialog build() { return Platform.getPlatform().getInstance(ProgressDialog.class, this); } }
@Override public ProgressDialog build() { return Platform.getPlatform().getInstance(ProgressDialog.class, this); } }
@Override public AlertDialog build() { return Platform.getPlatform().getInstance(AlertDialog.class, this); } }
@Override public InputDialog build() { return Platform.getPlatform().getInstance(InputDialog.class, this); } }
@Override public void show() { Platform.getPlatform().runOnUIThread(alert::show); }
public Store build() { if (productCatalog == null) { throw new UnsupportedOperationException("Need to set a product catalog!"); } if (billingObservers.size() == 0) { throw new UnsupportedOperationException("Need to add at least one billing observer!"); } Store store = Platform.getPlatform().getInstance(Store.class, this); if (verificator != null) { verificator.setStore(store); } return store; } }
public Store build() { if (productCatalog == null) { throw new UnsupportedOperationException("Need to set a product catalog!"); } if (billingObservers.size() == 0) { throw new UnsupportedOperationException("Need to add at least one billing observer!"); } Store store = Platform.getPlatform().getInstance(Store.class, this); if (verificator != null) { verificator.setStore(store); } return store; } }
public Store build() { if (productCatalog == null) { throw new UnsupportedOperationException("Need to set a product catalog!"); } if (billingObservers.size() == 0) { throw new UnsupportedOperationException("Need to add at least one billing observer!"); } Store store = Platform.getPlatform().getInstance(Store.class, this); if (verificator != null) { verificator.setStore(store); } return store; } }
public Settings(String name) { Util.requireNonNull(name, "name"); impl = Platform.getPlatform().getInstance(InternalSettings.class, name.trim()); setGson(new Gson()); }
public Settings(String name) { Util.requireNonNull(name, "name"); impl = Platform.getPlatform().getInstance(InternalSettings.class, name.trim()); setGson(new Gson()); }
public Settings(String name) { Util.requireNonNull(name, "name"); impl = Platform.getPlatform().getInstance(InternalSettings.class, name.trim()); setGson(new Gson()); }
@Override public void setProgress(double progress) { this.progress = progress; Platform.getPlatform().runOnUIThread(() -> { switch (style) { case Determinate: ((ProgressBarView) indicator).setProgress(progress); break; case Text: ((UILabel) indicator).setText(String.format("%d%%", (int) (progress * 100))); break; default: break; } }); }
@Override public void hide() { Platform.getPlatform().runOnUIThread(() -> { if (alertView != null) { alertView.dismiss(-1, true); } else { alertController.dismissViewController(true, null); } }); }
@Override public void show() { Platform.getPlatform().runOnUIThread(() -> { if (alertView != null) { alertView.show(); } else { alertController.show(); } }); }
@Override public void hide() { Platform.getPlatform().runOnUIThread(() -> { if (isShown) { UIView.animate(0.3, () -> { setTransform(CGAffineTransform.Identity().concat(CGAffineTransform.createScale(1.5, 1.5))); setAlpha(0.02); }, (complete) -> { setAlpha(0); removeFromSuperview(); alertWindow.setHidden(true); }); } }); }
@Override public void show() { alertWindow.makeKeyAndVisible(); alertWindow.getRootViewController().getView().addSubview(this); Platform.getPlatform().runOnUIThread(() -> { setTransform(CGAffineTransform.Identity().concat(CGAffineTransform.createScale(0.5, 0.5))); isShown = true; UIView.animate(0.3, () -> { setAlpha(1); setTransform(CGAffineTransform.Identity()); }); }); }
@Override public void setup(StoreSetupListener listener) { Util.requireNonNull(activity, "activity"); Util.requireNonNull(listener, "listener"); AndroidConfig.registerActivityLifecycleListener(new ActivityLifecycleListener() { @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { iabHelper.handleActivityResult(requestCode, resultCode, data); } }); Platform.getPlatform().runOnUIThread(() -> { iabHelper = new OpenIabHelper(activity, openIabOptions); iabHelper.startSetup((result) -> { if (!result.isSuccess()) { available = false; listener.onError(new BillingError(result.getMessage())); } else { storeType = getStoreTypeFromName(iabHelper.getConnectedAppstoreName()); available = true; listener.onSuccess(); } }); }); }