event: add String method to LifecycleStage enum
Change-Id: Iaa723e8db258540d60170216430295ac9dee1901 Reviewed-on: https://go-review.googlesource.com/11813 Reviewed-by: Nigel Tao <nigeltao@golang.org>
This commit is contained in:
parent
e19b161d0d
commit
f02d32beeb
@ -166,6 +166,21 @@ const (
|
||||
LifecycleStageFocused
|
||||
)
|
||||
|
||||
func (l LifecycleStage) String() string {
|
||||
switch l {
|
||||
case LifecycleStageDead:
|
||||
return "LifecycleStageDead"
|
||||
case LifecycleStageAlive:
|
||||
return "LifecycleStageAlive"
|
||||
case LifecycleStageVisible:
|
||||
return "LifecycleStageVisible"
|
||||
case LifecycleStageFocused:
|
||||
return "LifecycleStageFocused"
|
||||
default:
|
||||
return fmt.Sprintf("LifecycleStageInvalid:%d", l)
|
||||
}
|
||||
}
|
||||
|
||||
// Touch is a user touch event.
|
||||
//
|
||||
// The same ID is shared by all events in a sequence. A sequence starts with a
|
||||
|
Loading…
x
Reference in New Issue
Block a user