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 ValidationResult<E>( | |
val isValid: Boolean, | |
val errors: E | |
) | |
interface FieldValidator<I, O> { | |
fun validate(input: I): O | |
} | |
interface FormValidator<T, 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
[ | |
{ | |
"codigo":"498258755509976", | |
"dataCadastro":"23/11/2018" | |
}, | |
{ | |
"codigo":"455702866102495", | |
"dataCadastro":"23/11/2018" | |
}, | |
{ |
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 const val DEFAULT_NUMBER_OF_CIRCLES = 10 | |
class ProfitabilityIndexView @JvmOverloads constructor( | |
context: Context, | |
attrs: AttributeSet? = null, | |
defStyleAttr: Int = 0 | |
) : View(context, attrs, defStyleAttr) { | |
private val rect = RectF() |
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
package br.com.concrete.stepper | |
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Paint | |
import android.graphics.drawable.Drawable | |
import android.support.annotation.AttrRes | |
import android.support.annotation.ColorInt | |
import android.support.annotation.Dimension | |
import android.support.v7.content.res.AppCompatResources |
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
{ | |
"type": "elementGroup", | |
"properties": [ | |
{ | |
"name": "orientation", | |
"type": "string", | |
"value": "vertical" | |
} | |
], | |
"children": [ |
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
apply plugin: 'jacoco' | |
jacoco { | |
toolVersion = '0.8.0' | |
} | |
def exclude = [ | |
// list of classes you want to exclude from test coverage | |
] |
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
public class IdlingToaster extends Toaster { | |
private HashSet<Toast> toasts = new HashSet<>(); | |
@Override | |
public Toast makeText(Context context, CharSequence text, int duration) { | |
Toast toast = Toast.makeText(context, text, LENGTH_SHORT); | |
toast.getView().addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { | |
@Override |
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
package me.cassiano.estimate.chain; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.support.annotation.NonNull; | |
public abstract class ActivityResultChain { | |
private ActivityResultChain next; |
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
public class ExampleActivity extends AppCompatActivity implements OnMapReadyCallback { | |
private MapViewObserver mapView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_estimate); | |
MapView view = findViewById(R.id.map_view); | |
mapView = new MapViewObserver(getLifecycle(), view, this); |
NewerOlder