Name | Link |
---|---|
Download Favoritos para importa no Google Chrome | https://gist.github.com/rodolfoizidoro/f0d5051d9109eb7dc70c2dfcf42a67aa |
MVVM with Kotlin — Android Architecture Components, Dagger 2, Retrofit and RxAndroid | https://proandroiddev.com/mvvm-with-kotlin-android-architecture-components-dagger-2-retrofit-and-rxandroid-1a4ebb38c699 |
30 summertime Android libraries and tools which you don’t want to miss in 2018 | https://medium.com/@mmbialas/30-summertime-android-libraries-and-tools-which-you-dont-want-to-miss-in-2018-fab053d69503 |
KeepSafe/TapTargetView An implementation of tap targets from the Material Design guidelines for feature discovery | https://github.com/KeepSafe/TapTargetView |
Material Intro View is a showcase android library. | https://github.com/iammert/MaterialIntroView |
Modern background execution in Android | https://android-developers.googleblog.com/2018/10/modern-background-execution-in-android.html?m=1 |
Dominando o Data Binding no Android | https://pt.slideshare. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MovieListViewModel(private val repository: MovieRepository) : BaseViewModel() { | |
private val mMovies = StateMutableLiveData<List<Movie>, Throwable>() | |
val movies : StateLiveData<List<Movie>, Throwable> get() = mMovies | |
fun findMovies() { | |
jobs add launch { | |
mMovies.loading.value = true | |
try { | |
val response = repository.findMovies().await().results |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.lifecycle.LifecycleOwner | |
import androidx.lifecycle.LiveData | |
interface StateLiveData<R, E> { | |
fun observe(owner: LifecycleOwner, onSuccess: (R) -> Unit, onError: (E) -> Unit = {}, onLoading: (Boolean) -> Unit = {}) | |
val loadingLiveData: LiveData<Boolean> | |
val successLiveData: LiveData<R> | |
val errorLiveData: LiveData<E> | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewModel.movies.observe(this, Observer { list -> | |
rvMovies.adapter = MoviesAdapter(list) { | |
flowController.openMovieDetail(it) | |
} | |
}) | |
viewModel.progress.observe(this, Observer { visible -> | |
progress.show(visible) | |
}) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val mMovies = MutableLiveData<List<Movies>>() | |
private val mLoading = MutableLiveData<Boolean>() | |
private val mError = MutableLiveData<Thowable>() | |
val movies: LiveData<List<Movies>> get() = mMovies | |
val loading: LiveData<Boolean> get() = mLoading | |
val error: LiveData<Thowable> get() = mError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface MoviesView { | |
fun showProgress() | |
fun hideProgress() | |
fun showMovies(movies : List<Movie>) | |
fun showError(error : Throwable) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Abstração | |
class TestLiveData<T, Q> : TestLiveDataI<T, Q> { | |
val success = MutableLiveData<T>() | |
val loading = MutableLiveData<Boolean>() | |
val error = Event<Q>() | |
override fun successLiveData(): LiveData<T> = success | |
override fun loadingLiveData(): LiveData<Boolean> = loading | |
override fun errorLiveData(): LiveData<Q> = error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE NETSCAPE-Bookmark-file-1> | |
<!-- This is an automatically generated file. | |
It will be read and overwritten. | |
DO NOT EDIT! --> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
<TITLE>Bookmarks</TITLE> | |
<H1>Bookmarks</H1> | |
<DL><p> | |
<DT><H3 ADD_DATE="1489432446" LAST_MODIFIED="1545425521" PERSONAL_TOOLBAR_FOLDER="true">Barra de favoritos</H3> | |
<DL><p> |