This file contains 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
sealed class NewServiceIntent { | |
object LoadProducts: NewServiceIntent() | |
data class AddProduct(val product: Product): NewServiceIntent() | |
} | |
sealed class NewServiceState { | |
object ShowLoader: NewServiceState() | |
data class ReloadProducts(val products: List<Product>): NewServiceState() | |
data class ReloadCart(val cartList: List<Product>): NewServiceState() | |
object HideLoader: NewServiceState() |
This file contains 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 NewServiceViewModel( | |
private val useCase: NewServiceUseCase | |
): ViewModel { | |
private val _cart: MutableLiveData<List<Product>> | |
val cart: LiveData<List<Product>> get() = _cart | |
private val _products: MutableLiveData<List<Product>> | |
val products: LiveData<List<Product>> get() = _products | |
This file contains 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 LoginFragment { | |
val viewModel by viewModel<LoginViewModel>() | |
override fun onViewCreadted(){ | |
with(binding){ | |
action.setOnClickListener{ | |
viewModel.performIntent( | |
intent = PerformLoginWith( | |
username = usernameField.textAsString | |
) |
This file contains 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
desc "Submit a new Beta Build to Firebase App Distribution (Develop)🚀🚀" | |
lane :qa do | |
changelog = changelog_from_git_commits( | |
between: ["master", "HEAD"], | |
pretty: "- %s", | |
date_format: "short", | |
match_lightweight_tag: false, | |
merge_commit_filtering: "exclude_merges" | |
) |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define SIZE 5 | |
void showMenu(){ | |
printf("\n\nSelecciona:\n"); | |
printf("1) Crear matrix\n"); | |
printf("2) Sumar matrix\n"); |
This file contains 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
https://github.com/Yelp/swagger-gradle-codegen | |
https://medium.com/@joshuaavalon/migrate-from-gson-to-moshi-in-android-bfc9f357ff17 | |
https://start.insert-koin.io/#/quickstart/kotlin | |
https://www.androidelements.com/ | |
https://koenig-media.raywenderlich.com/uploads/2019/11/RW-Kotlin-Cheatsheet-1.1.pdf |
This file contains 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
fun TextView.setCollapseExpand(collapsibleView: View, onCollapse: () -> Unit, onExpand: () -> Unit) { | |
setCompoundDrawablesWithIntrinsicBounds(null, null, DrawableConstants.ic_expand_section.createDrawable(), null) | |
setOnClickListener { | |
when (collapsibleView.visibility) { | |
View.GONE -> { | |
collapsibleView.visibility = View.VISIBLE | |
setCompoundDrawablesWithIntrinsicBounds(null, null, DrawableConstants.ic_collapse_section.createDrawable(), null) | |
onExpand() | |
} | |
View.VISIBLE -> { |
This file contains 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
<LinearLayout | |
android:layout_width="0dp" | |
android:layout_height="match_parent" | |
android:orientation="horizontal" | |
app:layout_constraintEnd_toStartOf="@+id/final_view" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toTopOf="parent"> | |
<TextView | |
android:background="#999" |
This file contains 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
abstract class BaseHolder(override val containerView: View) : RecyclerView.ViewHolder(containerView), | |
LayoutContainer { | |
abstract fun reload(source: Any) | |
} |
This file contains 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
#!/bin/bash | |
# Stop cached listeners | |
watchman watch-del-all | |
# Remove installed modules | |
rm -rf node_modules | |
# Remove yarn meta files | |
rm yarn* |