Skip to content

Instantly share code, notes, and snippets.

@dmitry-osin
Created September 5, 2016 16:50
Show Gist options
  • Select an option

  • Save dmitry-osin/5255bce8d30864c7e95550d1d55ba398 to your computer and use it in GitHub Desktop.

Select an option

Save dmitry-osin/5255bce8d30864c7e95550d1d55ba398 to your computer and use it in GitHub Desktop.
class SearchActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_search)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setHomeButtonEnabled(true)
val ft = supportFragmentManager.beginTransaction()
ft.add(R.id.search_container, EmptyFragment()).commit()
}
var data = doAsync { // <-- магия тут
var result = Artist.getCorrection("Ramstain", ApiKeyProvider.ApiKey())
uiThread {
toast(result.name)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment