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
/* | |
* JavaFX SceneCaptureUtility 2016/07/02 | |
* | |
* The author of this software "Eudy Contreras" grants you ("Licensee") | |
* a non-exclusive, royalty free, license to use,modify and redistribute this | |
* software in source and binary code form. | |
* | |
* Please be aware that this software is simply part of a personal test | |
* and may in fact be unstable. The software in its current state is not |
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
/* | |
* JavaFX Splash Screen utility | |
* | |
* The author of this software "Eudy Contreras" grants you ("Licensee") | |
* a non-exclusive, royalty free, license to use,modify and redistribute this | |
* software in source and binary code form. | |
* | |
* Please be aware that this software is simply part of a personal test | |
* and may in fact be unstable. The software in its current state is not | |
* considered a finished product and has plenty of room for improvement and |
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
/* | |
* JavaFX Game Save and Load utility | |
* | |
* The author of this software "Eudy Contreras" grants you ("Licensee") | |
* a non-exclusive, royalty free, license to use,modify and redistribute this | |
* software in source and binary code form. | |
* | |
* Please be aware that this software is simply part of a personal test | |
* and may in fact be unstable. The software in its current state is not |
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
import java.nio.charset.StandardCharsets; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.SecureRandom; | |
import java.util.Arrays; | |
import java.util.BitSet; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.LinkedList; |
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
val choreographer = Choreographer(this) | |
choreographer | |
.allowChildInheritance(false) | |
.withDefaultPivot(0.5f, 0f) | |
.withDefaultInterpolator(interpolator) | |
.withDefaultDuration(800) | |
.animate(card){ | |
xRotateAdd(30f) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:bones="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<data> | |
<variable name="viewModel" type="com.eudycontreras.bones.SomeViewModel" /> | |
<import type="com.eudycontreras.boneslibrary.properties.ShapeType" /> |
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
dependencies { | |
implementation 'com.github.EudyContreras:Skeleton-Bones:v1.0' | |
} |
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 DemoData: DiffComparable { | |
abstract val id: String | |
override fun getIdentifier() = id | |
data class A( | |
override val id: String, | |
val text: String, | |
val imageUrl: String | |
) : DemoData() |
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 Resource<out T>( | |
open val data: T?, | |
open val loading: Boolean | |
) { | |
class Success<T>( | |
data: T | |
) : Resource<T>( | |
data = data, | |
loading = false | |
) |
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
private val demoData: MutableLiveData<Resource<List<DemoData?>?>> = MutableLiveData(Resource.Loading()) | |
// Start request and emit a loading state | |
demoData.postValue(Resource.Loading() | |
// Request was successfull. Emit the data | |
demoData.postValue(Resource.Success(data)) | |
OlderNewer