Commit 69ecb3a3 authored by wanglei's avatar wanglei

...

parent 0b21794a
......@@ -9,6 +9,7 @@ import android.os.Build
import android.os.Handler
import android.view.KeyEvent
import androidx.activity.result.contract.ActivityResultContracts
import com.base.browserwhite.R
import com.base.browserwhite.ads.AdmobMaxHelper
import com.base.browserwhite.bean.ConstObject.ifAgreePrivacy
import com.base.browserwhite.databinding.ActivitySplash2Binding
......@@ -72,8 +73,21 @@ class Splash2Activity : BaseActivity<ActivitySplash2Binding>(),
binding.root.post {
binding.tvDate.text = weather.fxDate
binding.tvTemperature.text = weather.tempMin + "℃" + " / " + weather.tempMax + "℃"
val icon = when (weather.iconDay) {
"Sunny day" -> R.mipmap.x_qing
"Cloudy day" -> R.mipmap.x_yin
"Rainy day" -> R.mipmap.x_dayu
"Snowy day" -> R.mipmap.x_xiaxue
"Greasy day" -> R.mipmap.x_wumaishachengbao
"Unknown" -> R.mipmap.x_qing
else -> R.mipmap.x_qing
}
binding.ivWeather.setImageResource(icon)
}
}
}.start()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment