Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override fun onActivityCreated(savedInstanceState: Bundle?) {
- super.onActivityCreated(savedInstanceState)
- viewModel = ViewModelProviders.of(this).get(CurrentWeatherViewModel::class.java)
- // TODO: Use the ViewModel
- val theTextView = view!!.findViewById<TextView>(R.id.responseApi)
- val apiServise = WeatherApiServise()
- responseApi.text = "Current"
- btn1.setOnClickListener {
- responseApi.text = "КАКОГО ХУЯ ОНО НЕ РАБОТАЕТ!"
- }
- btn2.setOnClickListener {
- GlobalScope.launch(Dispatchers.Main) {
- val currentWeatherResponse = apiServise.postLogin("ho", "pofig",DataInf("email@email","qwerty")).await()
- Log.e("TEST","$currentWeatherResponse.current")
- responseApi.text = currentWeatherResponse.postResponse.toString()
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement