当前位置: 首页>>代码示例>>Java>>正文


Java PublishRelay.create方法代码示例

本文整理汇总了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();
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:15,代码来源:ActivityResultNavigator.java

示例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);
    }
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:28,代码来源:AptoideAccountManager.java

示例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();
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:11,代码来源:CreditCardAuthorizationFragment.java

示例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();
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:9,代码来源:NotLoggedInShareFragment.java

示例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;
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:28,代码来源:AptoideApplication.java

示例6: RxBus

import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public RxBus(RemoteRxBus remoteRxBus) {
    mRemoteRxBus = remoteRxBus;
    mBus =  PublishRelay.create();
    mStickyEventMap = new ConcurrentHashMap<>();
}
 
开发者ID:z-chu,项目名称:FriendBook,代码行数:6,代码来源:RxBus.java

示例7: Output

import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
Output() {
    this.valueRelay = PublishRelay.create();
    this.errorRelay = PublishRelay.create();
}
 
开发者ID:hoanglm4,项目名称:RxAndroidTBP,代码行数:5,代码来源:SmartConfigClientImpl.java

示例8: publishRelayProxy

import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public static RxJava1RelayProxy publishRelayProxy() {
    return new RxJava1RelayProxy(PublishRelay.create());
}
 
开发者ID:apptik,项目名称:RHub,代码行数:4,代码来源:RxJava1Proxies.java

示例9: createPublish

import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public static <T> RxEventBus<T> createPublish() {
    return new RxEventBus<>(PublishRelay.<T>create());
}
 
开发者ID:christophwidulle,项目名称:Raclette,代码行数:4,代码来源:RxEventBus.java

示例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);
}
 
开发者ID:christophwidulle,项目名称:Raclette,代码行数:4,代码来源:Command.java

示例11: create

import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
public static <T> Command<T> create() {
    return new Command<T>(PublishRelay.<T>create());
}
 
开发者ID:christophwidulle,项目名称:Raclette,代码行数:4,代码来源:Command.java

示例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)));
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:42,代码来源:InstalledAppWidget.java

示例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);
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:82,代码来源:AppViewFragment.java

示例14: onCreate

import com.jakewharton.rxrelay.PublishRelay; //导入方法依赖的package包/类
@Override protected void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  results = PublishRelay.create();
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:5,代码来源:ActivityCustomTabsNavigator.java

示例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;
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:6,代码来源:RxAlertDialog.java


注:本文中的com.jakewharton.rxrelay.PublishRelay.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。