Created
April 19, 2019 17:34
-
-
Save shakir915/998cbf1ee088a8b3ca2fccdf49e5a471 to your computer and use it in GitHub Desktop.
convert js color array to kotlin
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
if (true) { | |
var s = "" | |
var longS = "" | |
ssss.split(",").forEach { | |
val iS = it.substringAfter("\"").substringBefore("\"") | |
if (iS.contains("#")) { | |
s = s + "\"" + iS + "\"," | |
} else { | |
s = s.removeSuffix(",") + "))," | |
Log.d("::::", " $s ") | |
longS = longS + s | |
s = """GradientS("$iS", arrayOf(""" | |
} | |
GradientS("Blu", arrayOf("#00416A", "#E4E5E6")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment