assets/src/ruboto/util/toast.rb in ruboto-1.0.3 vs assets/src/ruboto/util/toast.rb in ruboto-1.1.0
- old
+ new
@@ -5,14 +5,14 @@
# Utility methods for doing a toast.
#
#######################################################
Java::android.content.Context.class_eval do
- def toast(text, duration=5000)
+ def toast(text, duration=android.widget.Toast::LENGTH_SHORT)
Java::android.widget.Toast.makeText(self, text, duration).show
end
- def toast_result(result, success, failure, duration=5000)
+ def toast_result(result, success, failure, duration=android.widget.Toast::LENGTH_SHORT)
toast(result ? success : failure, duration)
end
end