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 ViewModel( | |
| // ... | |
| ): ViewModel(){ | |
| val buttonSizeLiveData = MutableLiveData<ButtonSize>() | |
| // ... | |
| private fun methodThatDoesSomething() { | |
| // ... |
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
| data class YourDomainDto( | |
| val field1: String, | |
| val field2: String | |
| ) |
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
| data class YourModelResponse( | |
| @SerializedName("field1") | |
| val field1: String, | |
| @SerializedName("field2") | |
| val field2: String | |
| ) |
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
| data class YourUiModel( | |
| val title: String, | |
| val description: String, | |
| val visibility: Int // View.GONE, etc | |
| ) | |
| class YourViewHolder( | |
| view: View | |
| ): RecyclerView.ViewHolder(view) { | |
| //... |
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
| // Icon from android resource | |
| { | |
| "icon": { | |
| type: "resources" | |
| "name": "resources_name" | |
| } | |
| } | |
| // Icon from url | |
| { |
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
| data class IconResponse( | |
| @SerializedName("type") | |
| val type: IconTypeEnum, | |
| @SerializedName("name") | |
| val name: String?, | |
| @SerializedName("url") | |
| val url: String? | |
| ) |
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
| sealed class Icon { | |
| data class Resources(val name: String) | |
| data class Url(val url: String) | |
| } |