![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Kotlin
ppoet
这个作者很懒,什么都没留下…
展开
-
Android kotlin 短小音效的播放
private fun startTone() { SoundManager.instance.loadSound( SoundManager.SoundBuilder(R.raw.touch_tone) .isLoop(false) .isTogetherPlay(true) // 是否同时播放多个音效 .isBackground(true)原创 2021-05-20 09:34:10 · 585 阅读 · 0 评论 -
Android 加载大图片 OOM ANR 解决方法
写一个压缩bitmap的方法fun readBitmap(context: Context, resId: Int): Bitmap? { val `is`: InputStream = context.resources.openRawResource(resId) val options = BitmapFactory.Options() options.inJustDecodeBounds = false options.inSampleSize = 2 // 长宽分原创 2021-05-19 17:05:32 · 163 阅读 · 0 评论 -
Android Kotlin 文本转语音
Android Kotlin 文本转语音定义TextToSpeech对象private var tts: TextToSpeech? = null对象初始化并设置监听tts = TextToSpeech(this, TextToSpeech.OnInitListener { status: Int -> if (status === TextToSpeech.SUCCESS) { val result = tts?.setLanguage(Locale.CHINESE原创 2021-05-19 16:56:51 · 386 阅读 · 0 评论 -
Kotlin官网学习路线行进图
参考自:Kotlin 语言中文站从左向右,两侧从内到外延展顺序,便于理清思路。原创 2021-01-17 18:49:18 · 387 阅读 · 2 评论