【发布时间】:2019-11-10 11:55:26
【问题描述】:
如何从此代码中获取价值time
val TAG = MainActivity::class.java.name
TrueTimeRx.build()
.initializeRx("time.google.com")
.subscribeOn(Schedulers.io())
.subscribe({ time ->
Log.v(TAG, "TrueTime was initialized and we have a time: $time") },
{ throwable -> throwable.printStackTrace() }
)
并把它放在这段代码中
helloWorld=findViewById(R.id.helloWorld)
val newTime=getString(R.string.hello, time)
helloWorld.text=newTime
如何从代码的第一部分获取time并将其放入第二部分
上面的代码在onCreate()
如果重要的话我有这个
internal lateinit var helloWorld: TextView
【问题讨论】: