Created
November 4, 2015 02:15
-
-
Save burntcookie90/628166d86b2dc65e3506 to your computer and use it in GitHub Desktop.
This file contains 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
@file:JvmName("ActivityUtils") | |
package io.dwak.sleepcyclealarm.extension | |
import android.app.Activity | |
import android.support.annotation.StringRes | |
import android.widget.Toast | |
@JvmOverloads | |
fun Activity.toast(message : String, length : Int = Toast.LENGTH_SHORT) { | |
Toast.makeText(this, message, length).show(); | |
} | |
@JvmOverloads | |
fun Activity.toast(@StringRes message : Int, length : Int = Toast.LENGTH_SHORT) { | |
Toast.makeText(this, message, length).show(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment