Questions tagged [rx-binding]

RxJava binding APIs for Android UI widgets from the platform and support libraries by Jake Wharton

RxJava binding APIs for Android UI widgets from the platform and support libraries by Jake Wharton

101 questions
2
votes
1 answer

CombineLatest with RxView.clicks

I am using Rxbinding library for detecting clicks on a textview and textchanges in an editbox. I need to have either a textview clicked or a non-empty editbox and to detect that I am using combinelatest operator on two observables as…
user2601981
  • 187
  • 2
  • 9
2
votes
1 answer

Use event bus to pass RxJava subscriptions

Currently I'm working on project which is using RxJava together with RxBinding to observe views' changes. It's working really well for fragments and activities where we have easy access to life-cycle events - as it's recommended we bind to data…
Krzysztof Skrzynecki
  • 2,345
  • 27
  • 39
2
votes
1 answer

RxView.debounce waits for the period of the debounce to execute the command, how do I execute the command right away?

I have the following code in my Android app, trying to prevent multiple clicks of a button: RxView.clicks(bSubmit) .debounce(2500, TimeUnit.MILLISECONDS) .observeOn(AndroidSchedulers.mainThread()) .subscribe(c ->…
Kaloyan Roussev
  • 14,515
  • 21
  • 98
  • 180
1
vote
1 answer

don't re-execute request while user is clicking repeatedly on fetch data button using rxbinding and rxjava

I have a RxView and I have set the click observer, I don't wanna always make new request per click. The thing that I wanna is to ignore user clicks when the fetching data request is in progress only using Rxjava and Rxbinding. button.clicks() …
1
vote
1 answer

Unit testing to check that the accept was called when using RxBindings

AS 4.0.2 RxBindings 4.0.0 I have written a unit test for testing if the PublishRelay accept has been called that uses jakeWartons rxBindings This is the snippet of code I am testing private val checkStoresRelay: Relay =…
ant2009
  • 27,094
  • 154
  • 411
  • 609
1
vote
1 answer

Can't migrate accurately from RxJava2 to RxJava3

I can't convert this method to RxJava3 despite having upgraded the dependencies fun setSearchField(searchField: EditText) { searchDisposable = searchField.afterTextChangeEvents() .skipInitialValue() .debounce(400,…
Kred
  • 319
  • 3
  • 12
1
vote
1 answer

What is more efficient: RxTextView.textChanges or doOnTextChanged?

What is better when need to listen/watch/observe value of edit text using RxBinding (RxTextView.textChanges) using doOnTextChanged ( reviewEditText.doOnTextChanged { _, _, _, _ -> checkButtonState() }) I have a screen with several…
Mahmoud Mabrok
  • 1,362
  • 16
  • 24
1
vote
1 answer

setOnSeekBarChangeListener with rxBinding

How can I use rxBinding to call setOnSeekBarChangeListener? My code : view?.seekBarDisplay?.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener { override fun onProgressChanged(seekBar: SeekBar, …
Reza Zavareh
  • 187
  • 3
  • 7
1
vote
1 answer

How to detect when an EditText is empty using RxTextView (RxBinding)

I'm doing validation on an EditText. I want the CharSequence to be invalid if it's empty or it doesn't begin with "https://". I'm also using RxBinding, specifically RxTextView. The problem is that when there is one character left, and I then delete…
Jo Momma
  • 1,126
  • 15
  • 31
1
vote
0 answers

How to supply side effect for RxBinding.textChanges() and preserve it's functionality on client side?

Suppose that i'm writing my own View class, that represents editable field and contains EditText tv_input inside: class EditTextIconItemView : LinearLayout { fun setInputText(text: String?) { with (tv_input) { setText(text) …
1
vote
0 answers

RxSeekBar onNext called before debounce timeout (very inconsistent)

I'm working on AndroidTv where I'm using the standard seekBar for playback. This is how I'm using the RxSeekBar RxSeekBar.changeEvents(seekBar) .debounce(SEEKBAR_DEBOUNCE_TIME, TimeUnit.MILLISECONDS) …
Veeresh Charantimath
  • 4,641
  • 5
  • 27
  • 36
1
vote
0 answers

RxBinding and DataBinding which is the best choice for MVVM

Recently , I was confusing about Rxbinding and Databinding for my project. Basically , my project is applying MVVM architecture. However there was some screen is created with Databinding and other one is worked with RxBinding. I am considering to…
Bulma
  • 990
  • 3
  • 16
  • 35
1
vote
1 answer

Constructor of inner class ViewHolder can be called only with receiver of containing class

I want to set a listener on RecyclerView items using RxJava2. The items are checkboxes. I want to listen to each item separately. So I am getting an error Constructor of inner class ViewHolder can be called only with receiver of containing class in…
1
vote
1 answer

Handle Connection Error in UITableView Binding (Moya, RxSwift, RxCocoa)

I'm using RxCoCoa and RxSwift for UITableView Biding. the problem is when Connection lost or other connection errors except for Server Errors(I handled them) my app crash because of binding error that mentioned below. my question is how to handle…
Mohsen mokhtari
  • 2,841
  • 1
  • 30
  • 39
1
vote
0 answers

Real Life Retrofit use cases with FlatMap and SwitchMap using a Subject or RXRelay

There are a lot of great posts and articles explaining FlatMap and SwitchMap, but I am asking here concrete complex real life with examples on how to use FlatMap and SwitchMap with Retrofit using a Subject or RXRelay, so to add a level of…
Drocchio
  • 383
  • 4
  • 21