Skip to content

Instantly share code, notes, and snippets.

View rakshakhegde's full-sized avatar

Rakshak Hegde rakshakhegde

View GitHub Profile
@RangeVariableMethod(minValue = 6, maxValue = 70, initialValue = 20)
public void setLabelSize(Float fontSize) { // Float? in Kotlin
indicator.setLabelSize(fontSize);
}
@BooleanVariableMethod(initialValue = true)
public void showLabels(Boolean showLabels) {
indicator.showLabels(showLabels);
}
@ColorListVariableMethod(limitedToValues = {0xFF00b47c, 0xFF3f51b5, 0xFFf44336})
public void setIndicatorColor(Integer indicatorColor) {
indicator.setIndicatorColor(indicatorColor);
}
@rakshakhegde
rakshakhegde / my-layout.xml
Last active May 19, 2018 11:03
Setting hint color of `TextInputLayout`
<android.support.design.widget.TextInputLayout
android:theme="@style/PickupEditTextHint"
>
<android.support.design.widget.TextInputEditText />
</android.support.design.widget.TextInputLayout>
import kotlin.reflect.KFunction1
import kotlin.test.assertEquals
fun main() {
assertSums(::makeSum)
assertSums(::makeSum2)
assertSums(::makeSum3)
}
fun assertSums(kFunction1: KFunction1<List<Int>, List<Int>>) {