I hereby claim:
- I am pbochenski on github.
- I am pbochenski (https://keybase.io/pbochenski) on keybase.
- I have a public key ASACh_c5xS4LldtUYAA93fRgyYJEQA_8FLHVaS-y5mdkYgo
To claim this, I am signing this object:
import android.os.Bundle | |
import androidx.annotation.StringRes | |
import androidx.appcompat.app.AlertDialog | |
import androidx.core.os.bundleOf | |
import androidx.fragment.app.DialogFragment |
@Component | |
interface AppComponent |
I hereby claim:
To claim this, I am signing this object:
class MainViewModel(app: Application) : AndroidViewModel(app) { | |
private val postRepo = getApplication<App>().postRepo | |
private val LOAD_ITEM_COUNT = 15 | |
fun getPosts(): LiveData<List<Post>> { | |
return postRepo.posts.map { | |
it.map { Post(it.id, it.title, it.url) } | |
} | |
} | |
java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked. See http://g.co/androidstudio/not-mocked for details.
at android.os.Looper.getMainLooper(Looper.java)
at android.arch.core.executor.DefaultTaskExecutor.isMainThread(DefaultTaskExecutor.java:58)
at android.arch.core.executor.AppToolkitTaskExecutor.isMainThread(AppToolkitTaskExecutor.java:115)
at android.arch.lifecycle.LiveData.assertMainThread(LiveData.java:408)
at android.arch.lifecycle.LiveData.setValue(LiveData.java:290)
at android.arch.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33)
at pl.pbochenski.archcomponentstest.MainViewModelTest.shouldGetPostsAndHaveACopyOfIt(MainViewModelTest.kt:48) ...
//private methods: | |
void readKeyboard(); | |
void resetButtons(); | |
void advanceButtons(); | |
void pushToSerial(); | |
byte getPitch(int i); | |
void midi_note_off(byte key); | |
void midi_note_on(byte key); |