Created
September 5, 2016 16:50
-
-
Save dmitry-osin/5255bce8d30864c7e95550d1d55ba398 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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