先上效果图:一分钟实现下面的效果!
下面是教程:
1、使用下面的方法:
private val listDpDimen = arrayListOf<String>()private fun initDimen() {listDpDimen.clear()for (i in 1..1000) {val s = "<dimen name=\"dp$i\">${i}dp</dimen>\n"listDpDimen.add(s)}val listString = listDpDimen.toString().replace("[", "").replace("]", "").replace(",", "")Log.i("initDimen", "initDimen: $listString")}