Skip to content

How to disable button while AlphaAnimation running

I want to disable click on button when the animation running. the code is below: So i want to cant click the button until animation done. Answer I normally accomplish something like this is using an AnimationListener. It allows you to run code at various stages of the animation. This code is untested, but the…

How to assert inside a RecyclerView in Espresso?

I am using espresso-contrib to perform actions on a RecyclerView, and it works as it should, ex: and I need to perform assertions on it. Something like this: but, because RecyclerViewActions is, of course, expecting an action, it says wrong 2nd argument type. There’s no RecyclerViewAssertions on espress…

How to send byte[] array in retrofit

How do you send byte[] array in retrofit call. I just need to send over byte[]. I get this exception when I have been trying to send a retrofit call. retrofit.RetrofitError: retrofit.converter.ConversionException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:  Expected a string but was…

Testing image files with JUnit

I’m looking for direction on how to test that a dynamically generated image is the expected image with JUnit. A bit of background: I have code that generates thumbnail images as java.awt.image.BufferedImage’s and stores those BufferedImages into a java.io.File object. I wrote a simple unit test to…