Category: Android

0

TextInputLayout set collapsed hint color

There are so many ways to try changing the TextInputLayout collapsed hint color that you can get crazy by just trying all of them. And besides that, there is not even one working as...

0

textAppearance does not work on custom TextView

Having a custom TextView is a totally normal thing these days. The problem comes when you try the following: <com.test.view.MyCustomTextView android:layout_width="wrap_content" android:layout_height="match_parent" android:textAppearance="@style/MyCustomTextAppearance" /> If your custom TextView extends from the TextView class then...

0

RxJava & LiveData combined error handling

Using RxJava with the architecture components from Google in the latest project that I was working on, it made me think how does error handling fit with the LiveData and can you keep the RxJava error...

0

Mockito anyString() vs any() – null handling

Sometimes, when I mock a method in Mockito, I used anyString instead of any and I get into a mess and my test fails. Why? given(mUserRepo.getUser(anyString(). any())).willReturn(new User()); And what will happen if mUserRepo.getUser(null);...

0

.blockingGet & AndroidSchedulers.mainThread() make the app stuck

Recently, I had a very strange problem to debug. I had the following interactor: public class GetUserUpdatesInteractor { private final UserRepository mUserRepository; private final InteractorSchedulers mSchedulers; @Inject public GetUserUpdatesInteractor(UserRepository userRepository, InteractorSchedulers schedulers) { mUserRepository...