android / android-ktx

A set of Kotlin extensions for Android app development.
https://android.github.io/android-ktx/core-ktx/
7.47k stars 563 forks source link

Other features #196

Closed dovahkiin98 closed 6 years ago

dovahkiin98 commented 6 years ago

I am very glad to see Kotlin so important to you, and I would kindly like to request features :

1- Create intents quickly example: Activity.intentTo(Class<T : Activity>, vararg extras) Activity.startActivity<MainUI>()

2- Use fragments faster example: supportFragmentManager.transaction { }

3- Create Toasts and Snackbars quickly example: View.showSnackbar(message: String, actionListener: () -> Unit)

4- Add actions to Widgets examples: EditText.isBlank() EditText.onTextChanged { }

5- Easier AsyncTasks and AsyncLoaders example: doAsync { }

There are many great extensions in the Anko-Kotlin library, please try to make use of such a great Library.

That is it for now, thank you for reading and hope to see the release version soon

MGaetan89 commented 6 years ago
  1. See #189
  2. Framework Fragment will be deprecated in the next Android version (see https://github.com/android/android-ktx/pull/161#issuecomment-363270555), and this library does not deal with the Support Libraries or the Architecture Components
  3. See #143, there is nothing for Snackbar yet
  4. See #151
  5. Nothing yet

Feel free to send a PR for the open points ;)

romainguy commented 6 years ago

For 5 something based on coroutines would make more sense.

daberni commented 6 years ago

Making separate issues for each point would allow a proper discussion.

geniushkg commented 6 years ago

@MGaetan89 even Snackbar comes under support library, So i assume thats not in features list. please correct me if assumption is incorrect.

JakeWharton commented 6 years ago

As said above, these should be separate issues and we already have some for the things you listed.