6

I wanted to change the toast from the bottom of the screen to the top, but I found that "Starting from Android Build.VERSION_CODES#R, for apps targeting API level Build.VERSION_CODES#R or higher, this method is a no-op when called on text toasts." - https://developer.android.com/reference/kotlin/android/widget/Toast#setgravity

Is there still a way to change the position? Or is that not at all possible anymore?

3
  • AFAIK, that is not possible anymore. Commented Dec 9, 2020 at 23:27
  • Is there anyway to achieve the same effect a different way?
    – Doragon
    Commented Dec 10, 2020 at 0:55
  • Don't use a Toast. In your own activity, you can position things wherever you want. Commented Dec 10, 2020 at 12:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.