本文整理汇总了Java中com.jakewharton.rxrelay.PublishRelay.create方法的典型用法代码示例。如果您正苦于以下问题:Java PublishRelay.create方法的具体用法?Java PublishRelay.create怎么用?Java PublishRelay.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jakewharton.rxrelay.PublishRelay
的用法示例。
在下文中一共展示了PublishRelay.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
@SuppressLint("UseSparseArrays") @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
fragmentResultRelay = ((AptoideApplication) getApplicationContext()).getFragmentResultRelay();
fragmentResultMap = ((AptoideApplication) getApplicationContext()).getFragmentResulMap();
fragmentNavigator =
new FragmentResultNavigator(getSupportFragmentManager(), R.id.fragment_placeholder,
android.R.anim.fade_in, android.R.anim.fade_out, fragmentResultMap,
fragmentResultRelay);
// super.onCreate handles fragment creation using FragmentManager.
// Make sure navigator instances are already created when fragments are created,
// else getFragmentNavigator and getActivityNavigator will return null.
super.onCreate(savedInstanceState);
resultRelay = PublishRelay.create();
}
示例2: build
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public AptoideAccountManager build() {
if (accountPersistence == null) {
throw new IllegalArgumentException("AccountDataPersist is mandatory.");
}
if (accountService == null) {
throw new IllegalArgumentException("AccountManagerService is mandatory.");
}
if (credentialsValidator == null) {
credentialsValidator = new CredentialsValidator();
}
if (accountRelay == null) {
accountRelay = PublishRelay.create();
}
final SignUpAdapterRegistry adapterRegistry =
new SignUpAdapterRegistry(adapters, accountService);
adapterRegistry.register(APTOIDE_SIGN_UP_TYPE,
new AptoideSignUpAdapter(credentialsValidator));
return new AptoideAccountManager(credentialsValidator, accountPersistence, accountService,
accountRelay, adapterRegistry);
}
示例3: onCreate
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
billing = ((AptoideApplication) getContext().getApplicationContext()).getBilling(
getArguments().getString(BillingActivity.EXTRA_MERCHANT_NAME));
navigator = ((ActivityResultNavigator) getActivity()).getBillingNavigator();
analytics = ((AptoideApplication) getContext().getApplicationContext()).getBillingAnalytics();
backButton = PublishRelay.create();
keyboardBuyRelay = PublishRelay.create();
adyen = ((AptoideApplication) getContext().getApplicationContext()).getAdyen();
}
示例4: onCreate
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
errorMapper = new AccountErrorMapper(getContext(), new ErrorsMapper());
accountManager =
((AptoideApplication) getContext().getApplicationContext()).getAccountManager();
requestCode = getArguments().getInt(FragmentNavigator.REQUEST_CODE_EXTRA);
backButtonPress = PublishRelay.create();
}
示例5: getRootInstallationRetryHandler
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public RootInstallationRetryHandler getRootInstallationRetryHandler() {
if (rootInstallationRetryHandler == null) {
Intent retryActionIntent = new Intent(this, RootInstallNotificationEventReceiver.class);
retryActionIntent.setAction(RootInstallNotificationEventReceiver.ROOT_INSTALL_RETRY_ACTION);
PendingIntent retryPendingIntent =
PendingIntent.getBroadcast(this, 2, retryActionIntent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Action action =
new NotificationCompat.Action(R.drawable.ic_refresh_black_24dp,
getString(R.string.generalscreen_short_root_install_timeout_error_action),
retryPendingIntent);
PendingIntent deleteAction = PendingIntent.getBroadcast(this, 3, retryActionIntent.setAction(
RootInstallNotificationEventReceiver.ROOT_INSTALL_DISMISS_ACTION),
PendingIntent.FLAG_UPDATE_CURRENT);
int notificationId = 230498;
rootInstallationRetryHandler =
new RootInstallationRetryHandler(notificationId, getSystemNotificationShower(),
getInstallManager(InstallerFactory.ROLLBACK), PublishRelay.create(), 0, this,
new RootInstallErrorNotificationFactory(notificationId,
BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher), action,
deleteAction));
}
return rootInstallationRetryHandler;
}
示例6: RxBus
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public RxBus(RemoteRxBus remoteRxBus) {
mRemoteRxBus = remoteRxBus;
mBus = PublishRelay.create();
mStickyEventMap = new ConcurrentHashMap<>();
}
示例7: Output
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
Output() {
this.valueRelay = PublishRelay.create();
this.errorRelay = PublishRelay.create();
}
示例8: publishRelayProxy
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public static RxJava1RelayProxy publishRelayProxy() {
return new RxJava1RelayProxy(PublishRelay.create());
}
示例9: createPublish
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public static <T> RxEventBus<T> createPublish() {
return new RxEventBus<>(PublishRelay.<T>create());
}
示例10: createAndBind
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public static <T> Command<T> createAndBind(Observable<ViewModelLifecycleState> lifecycleSubject) {
return new Command<T>(PublishRelay.<T>create(), lifecycleSubject);
}
示例11: create
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public static <T> Command<T> create() {
return new Command<T>(PublishRelay.<T>create());
}
示例12: bindView
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
@Override public void bindView(InstalledAppDisplayable displayable) {
final Installed pojo = displayable.getPojo();
final AptoideApplication application =
(AptoideApplication) getContext().getApplicationContext();
accountManager = application.getAccountManager();
httpClient = application.getDefaultClient();
converterFactory = WebService.getDefaultConverter();
this.bodyInterceptor =
((AptoideApplication) getContext().getApplicationContext()).getAccountSettingsBodyInterceptorPoolV7();
final AccountNavigator accountNavigator =
((ActivityResultNavigator) getContext()).getAccountNavigator();
this.accountNavigator = accountNavigator;
dialogUtils = new DialogUtils(accountManager, accountNavigator, bodyInterceptor, httpClient,
converterFactory, displayable.getInstalledRepository(),
((AptoideApplication) getContext().getApplicationContext()).getTokenInvalidator(),
((AptoideApplication) getContext().getApplicationContext()).getDefaultSharedPreferences(),
getContext().getResources());
shareAppHelper = new ShareAppHelper(
RepositoryFactory.getInstalledRepository(getContext().getApplicationContext()),
accountManager, accountNavigator, getContext(),
new SpotAndShareAnalytics(Analytics.getInstance()), displayable.getTimelineAnalytics(),
PublishRelay.create(), application.getDefaultSharedPreferences(),
application.isCreateStoreUserPrivacyEnabled());
appName = pojo.getName();
packageName = pojo.getPackageName();
labelTextView.setText(pojo.getName());
verNameTextView.setText(pojo.getVersionName());
final FragmentActivity context = getContext();
ImageLoader.with(context)
.load(pojo.getIcon(), iconImageView);
shareButtonLayout.setVisibility(View.VISIBLE);
compositeSubscription.add(RxView.clicks(shareButtonLayout)
.subscribe(__ -> shareAppHelper.shareApp(appName, packageName, pojo.getIcon(),
SpotAndShareAnalytics.SPOT_AND_SHARE_START_CLICK_ORIGIN_UPDATES_TAB),
err -> CrashReport.getInstance()
.log(err)));
}
示例13: onCreate
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
handleSavedInstance(savedInstanceState);
final AptoideApplication application =
(AptoideApplication) getContext().getApplicationContext();
this.appViewModel.setDefaultTheme(application.getDefaultThemeName());
this.appViewModel.setMarketName(application.getMarketName());
final SearchManager searchManager =
(SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE);
final SearchNavigator searchNavigator =
new SearchNavigator(getFragmentNavigator(), application.getDefaultStoreName());
searchBuilder = new SearchBuilder(searchManager, searchNavigator);
adMapper = new MinimalAdMapper();
qManager = ((AptoideApplication) getContext().getApplicationContext()).getQManager();
purchaseBundleMapper =
((AptoideApplication) getContext().getApplicationContext()).getPurchaseBundleMapper();
final AptoideAccountManager accountManager =
((AptoideApplication) getContext().getApplicationContext()).getAccountManager();
accountNavigator = ((ActivityResultNavigator) getContext()).getAccountNavigator();
installManager = ((AptoideApplication) getContext().getApplicationContext()).getInstallManager(
InstallerFactory.ROLLBACK);
final BodyInterceptor<BaseBody> bodyInterceptor =
((AptoideApplication) getContext().getApplicationContext()).getAccountSettingsBodyInterceptorPoolV7();
billingAnalytics =
((AptoideApplication) getContext().getApplicationContext()).getBillingAnalytics();
final TokenInvalidator tokenInvalidator =
((AptoideApplication) getContext().getApplicationContext()).getTokenInvalidator();
httpClient = ((AptoideApplication) getContext().getApplicationContext()).getDefaultClient();
converterFactory = WebService.getDefaultConverter();
Analytics analytics = Analytics.getInstance();
issuesAnalytics = new IssuesAnalytics(analytics, Answers.getInstance());
installAnalytics = new InstallAnalytics(analytics,
AppEventsLogger.newLogger(getContext().getApplicationContext()));
SharedPreferences sharedPreferences = application.getDefaultSharedPreferences();
timelineAnalytics = new TimelineAnalytics(analytics,
AppEventsLogger.newLogger(getContext().getApplicationContext()), bodyInterceptor,
httpClient, converterFactory, tokenInvalidator, BuildConfig.APPLICATION_ID,
sharedPreferences, application.getNotificationAnalytics(), navigationTracker,
application.getReadPostsPersistence());
socialRepository =
new SocialRepository(accountManager, bodyInterceptor, converterFactory, httpClient,
timelineAnalytics, tokenInvalidator, sharedPreferences);
appRepository = RepositoryFactory.getAppRepository(getContext(), sharedPreferences);
adsRepository = application.getAdsRepository();
installedRepository =
RepositoryFactory.getInstalledRepository(getContext().getApplicationContext());
storeCredentialsProvider = new StoreCredentialsProviderImpl(AccessorFactory.getAccessorFor(
((AptoideApplication) getContext().getApplicationContext()
.getApplicationContext()).getDatabase(), Store.class));
storedMinimalAdAccessor = AccessorFactory.getAccessorFor(
((AptoideApplication) getContext().getApplicationContext()
.getApplicationContext()).getDatabase(), StoredMinimalAd.class);
final SpotAndShareAnalytics spotAndShareAnalytics = new SpotAndShareAnalytics(analytics);
appViewAnalytics = new AppViewAnalytics(analytics,
AppEventsLogger.newLogger(getContext().getApplicationContext()), bodyInterceptor,
httpClient, tokenInvalidator, converterFactory, sharedPreferences);
appViewSimilarAppAnalytics = new AppViewSimilarAppAnalytics(analytics,
AppEventsLogger.newLogger(getContext().getApplicationContext()));
installAppRelay = PublishRelay.create();
shareAppHelper =
new ShareAppHelper(installedRepository, accountManager, accountNavigator, getActivity(),
spotAndShareAnalytics, timelineAnalytics, installAppRelay, sharedPreferences,
application.isCreateStoreUserPrivacyEnabled());
downloadFactory = new DownloadFactory(getMarketName());
storeAnalytics =
new StoreAnalytics(AppEventsLogger.newLogger(getContext().getApplicationContext()),
analytics);
notLoggedInShareAnalytics = application.getNotLoggedInShareAnalytics();
navigationTracker = application.getNavigationTracker();
setHasOptionsMenu(true);
}
示例14: onCreate
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
@Override protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
results = PublishRelay.create();
}
示例15: setPositiveButton
import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public Builder setPositiveButton(@StringRes int textId) {
positiveClick = new DialogClick(DialogInterface.BUTTON_POSITIVE, PublishRelay.create());
builder.setPositiveButton(textId, positiveClick);
return this;
}