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 OrderPresenter( | |
private val view: OrderContract.View, | |
private val createNewOrder: CreateNewOrder, | |
private val addItemToOrder: AddItemToOrder, | |
private val permissionRequester: PermissionRequester, | |
private val scheduler: Scheduler, | |
) : OrderContract.Presenter { | |
private var state = State( | |
order = null, |
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 FillDrawable(private val color: Int, layers: Array<out Drawable>) : LayerDrawable(layers) { | |
private val radius: Float = 20f | |
private val paint = Paint(Paint.ANTI_ALIAS_FLAG).apply { | |
color = [email protected] | |
} | |
private var r = copyBounds() |
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 ClickDrawable(layers: Array<out Drawable> = arrayOf()) : LayerDrawable(layers) { | |
… | |
private val mask: Drawable = | |
ColorDrawable(0xFF00FFFF.toInt()).apply { alpha = 0 } | |
init { | |
addLayer(mask) | |
} | |
… |
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 ClickDrawable(layers: Array<out Drawable> = arrayOf()) : LayerDrawable(layers) { | |
private var wasPressed = false | |
private var mActive = false | |
private var canStart = true | |
private var mBounds = bounds | |
override fun isStateful(): Boolean { | |
return true | |
} |
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
… | |
@Override | |
protected boolean onStateChange(int[] stateSet) { | |
final boolean changed = super.onStateChange(stateSet); | |
boolean enabled = false; | |
boolean pressed = false; | |
boolean focused = false; | |
boolean hovered = false; |
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 DisplayCandidates { | |
fun all() | |
fun withName(name: String) | |
data class Candidate(val id: String, val name: String, val phoneNumbers: Collection<String>) { | |
internal companion object { | |
fun from(candidate: CandidateEntity) = Candidate(candidate.id, candidate.fullName, candidate.contactNumbers.map { it.phoneNumber }) | |
} |
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
enum class Assessment { | |
A, B, C, D, E, F | |
} |