本文整理匯總了Java中rx.android.schedulers.AndroidSchedulers.mainThread方法的典型用法代碼示例。如果您正苦於以下問題:Java AndroidSchedulers.mainThread方法的具體用法?Java AndroidSchedulers.mainThread怎麽用?Java AndroidSchedulers.mainThread使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rx.android.schedulers.AndroidSchedulers
的用法示例。
在下文中一共展示了AndroidSchedulers.mainThread方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_search);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
progressBar = (ProgressBar) findViewById(R.id.progress_bar);
textViewErrorMessage = (TextView) findViewById(R.id.text_view_error_msg);
recyclerViewUsers = (RecyclerView) findViewById(R.id.recycler_view_users);
usersAdapter = new UsersAdapter(null, this);
recyclerViewUsers.setAdapter(usersAdapter);
userSearchPresenter = new UserSearchPresenter(Injection.provideUserRepo(), Schedulers.io(),
AndroidSchedulers.mainThread());
userSearchPresenter.attachView(this);
}
示例2: onCreate
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_make_up_search);
progressBar = (ProgressBar) findViewById(R.id.progress_bar);
textViewErrorMessage = (TextView) findViewById(R.id.text_view_error_msg);
textViewEmptyMessage = (TextView) findViewById(R.id.textView_empty_in_here);
textViewGoBackMessage = (TextView) findViewById(R.id.textView_go_back_and_search);
recyclerViewMakeUp = (RecyclerView) findViewById(R.id.recycler_view_makeup);
lottieAnimationView = (LottieAnimationView) findViewById(R.id.animation_view);
StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2,
StaggeredGridLayoutManager.VERTICAL);
makeUpSearchAdapter = new MakeUpSearchAdapter(null);
recyclerViewMakeUp.setLayoutManager(staggeredGridLayoutManager);
recyclerViewMakeUp.setAdapter(makeUpSearchAdapter);
makeupSearchPresenter = new MakeUpSearchPresenter(Injection.provideUserRepo(), Schedulers.io(),
AndroidSchedulers.mainThread());
makeupSearchPresenter.attachView(this);
String brand = getIntent().getStringExtra("brand_selected");
String product = getIntent().getStringExtra("product_selected");
makeupSearchPresenter.search(brand, product);
}
示例3: mainThread
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Override public Scheduler mainThread() {
return AndroidSchedulers.mainThread();
}
示例4: provideMainScheduler
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Provides
@Singleton
@MainThread
Scheduler provideMainScheduler() {
return AndroidSchedulers.mainThread();
}
示例5: getMainThread
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Provides
@Singleton
@Named(ValueConstants.MAIN_THREAD)
public Scheduler getMainThread() {
return AndroidSchedulers.mainThread();
}
示例6: androidThread
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Override
public Scheduler androidThread() {
return AndroidSchedulers.mainThread();
}
示例7: mainThread
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Override
public Scheduler mainThread() {
return AndroidSchedulers.mainThread();
}
示例8: RetrieveWelcomeMessageUC
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
public RetrieveWelcomeMessageUC() {
super(Schedulers.computation(), AndroidSchedulers.mainThread(), LoggerFactory.getLogger(RetrieveWelcomeMessageUC.class));
}
示例9: ui
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Override
public Scheduler ui() {
return AndroidSchedulers.mainThread();
}
示例10: getMainScheduler
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@NonNull
@Override
public Scheduler getMainScheduler() {
return AndroidSchedulers.mainThread();
}
示例11: getScheduler
import rx.android.schedulers.AndroidSchedulers; //導入方法依賴的package包/類
@Override
public Scheduler getScheduler() {
return AndroidSchedulers.mainThread();
}