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 class Outer { | |
val outerValue = "Outer value" | |
inner class ReallyInnerClass { | |
fun printOuterValue() { | |
println(outerValue) | |
} | |
} |
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 WeatherEvent | |
class Rain : WeatherEvent() | |
class Snow : WeatherEvent() | |
class Fire : WeatherEvent() | |
class Performer() { | |
fun perform(event: WeatherEvent) { |
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 Circle(val radius:Int = 15) { | |
val name = "My Circle" | |
val color:Int | |
init{ | |
color = 0x555556 | |
} | |
} |
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 Shape( | |
val radius: Int = 15, | |
val color: Int = 12345, | |
val shapeName: String = "My Circle", | |
val strokeWidth: Float = 35.55f, | |
val id: Long = -1L | |
) |
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 Shape( | |
val radius: Int = 15, | |
val color: Int = 12345, | |
val shapeName: String = "My Circle", | |
val strokeWidth: Float = 35.55f, | |
val id: Long = -1L | |
) |
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 main() { | |
Shape(radius = 1) | |
Shape(radius = 3, id = 100) | |
Shape(radius = 3, | |
color = 121212, | |
shapeName = "triangle", | |
strokeWidth = 22f, | |
id = 100) |
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
<resources> | |
... | |
<color name="neon_body">#BEFF09</color> | |
<color name="neon_glow">#CBBCFF00</color> | |
</resources> |
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
public class GradientCircularProgressBar extends View { | |
public GradientCircularProgressBar(Context context) { | |
super(context); | |
init(); | |
} | |
public GradientCircularProgressBar(Context context, | |
AttributeSet attrs) { | |
super(context, attrs); |
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
public class GradientCircularProgressBar extends View { | |
private static final int BODY_STROKE_WIDTH = 12; | |
private static final int GLOW_STROKE_WIDTH = BODY_STROKE_WIDTH * 3; | |
private static final int PADDING = GLOW_STROKE_WIDTH / 2; | |
private static final int BODY_LENGTH = 270; | |
... |
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 static final int BODY_LENGTH = 270; | |
private float mPaddingPx; | |
private float mBodyStrokeWidthPx; | |
private float mGlowStrokeWidthPx; | |
... |