Brendan Campbell-hartzell
05/27/2021, 11:34 PMNauman Ashraf
06/01/2021, 2:55 PMJason5lee
06/02/2021, 2:20 PMColton Idle
06/02/2021, 11:39 PMColton Idle
06/05/2021, 4:49 PM(?=.*?[A-Z])(?=(.*[a-z]){1,})
orangy
06/06/2021, 11:54 AMAndroid
Sound
Does anyone know a decent guide for playing sounds on Android from pre-recorded samples, with simultaneous sounds, effects like reverb, loops, tone/pitch variations, attack variations, etc? Kinda like Tone.js. Looking into documentation I’m confused between MediaPlayer, SoundPool, AudioEffects, Oboe and such.Slackbot
06/07/2021, 9:53 AMkartikpatodi
06/13/2021, 2:28 AMrtsketo
06/15/2021, 5:53 AMcapitalize()
is deprecated and I'm prompted to replaced it with
replaceFirstChar { if (it.isLowerCase())
it.titlecase(Locale.getDefault()) else it.toString() })
How's that better? I guess I'll re-create the shortcut myself ¯\_(ツ)_/¯Colton Idle
06/16/2021, 1:47 AMShawn
06/23/2021, 9:02 PMit
• Return value: Context object
• Is extension function: No: takes the context object as an argument.
None of the existing names really match how this function is used (though I guess also
is close) and the best name I’ve been able to come up with is build()
, but maybe there’s something better?Hullaballoonatic
06/26/2021, 10:05 PMTheOnlyTails
06/30/2021, 10:37 PMJason5lee
07/03/2021, 11:06 AMmp
07/05/2021, 10:07 AMColton Idle
07/06/2021, 11:10 PMnapperley
07/15/2021, 1:41 AMColton Idle
07/16/2021, 5:47 PMSami Eljabali
07/18/2021, 3:39 PMhho
07/19/2021, 3:23 PMJason5lee
07/24/2021, 3:04 PMColton Idle
08/05/2021, 4:22 PMfun formatPhoneNumber(original: String): String {
var number = original
number =
number.dropLast(4) +
"-" +
number.substring(
number.length - 4,
number.length,
)
number =
number.substring(0, number.length - 8) +
")" +
number.substring(
number.length - 8,
number.length,
)
(number.dropLast(12) +
"(" +
number.substring(
number.length - 12,
number.length,
)).also { number = it }
return number
}
Jason5lee
08/08/2021, 2:08 PMResult
instead of normal sealed class and data class inheritance?Youssef Shoaib [MOD]
08/10/2021, 8:22 PMDerek Ellis
08/12/2021, 3:04 PM==
comparison evaluates to false
.ursus
08/16/2021, 9:15 PMursus
08/19/2021, 11:48 AMsmit01
08/20/2021, 11:23 AMDominaezzz
08/21/2021, 12:22 PMShawn
08/23/2021, 7:52 PMShawn
08/23/2021, 7:52 PMrtsketo
08/23/2021, 7:56 PM@Suppress("deprecation")
above the line of code you want to suppress.Ruckus
08/23/2021, 8:12 PMShawn
08/23/2021, 8:14 PMRuckus
08/23/2021, 8:21 PM@Suppress("DEPRECATION")
before the run. Nothing within the run will show deprecation warnings.
e.g.
deprecatedFunction() // Warning
@Suppress("DEPRECATION")
run {
deprecatedFunction() // No warning
...
anotherDeprecatedFunction() // No warning
}
anotherDeprecatedFunction() // Warning