keyboard

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package keyboard exposes access to displaying and hiding the keyboard.

input := textinput.New(ctx, "input")
input.Text = v.text
input.KeyboardType = keyboard.URLType
input.Responder = v.responder

button := ...
button.OnTap = func() {
	v.responder.Dismiss()
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Responder

type Responder struct {
	// contains filtered or unexported fields
}

Responder is a model object that represents the keyboard's state. To use Responder it must be attached to a textinput.View.

func (*Responder) Dismiss

func (g *Responder) Dismiss()

Dismiss hides any displayed keyboards.

func (*Responder) Notify

func (g *Responder) Notify(f func()) comm.Id

Notify implements comm.Notifier.

func (*Responder) Show

func (g *Responder) Show()

Show displays the keyboard.

func (*Responder) Unnotify

func (g *Responder) Unnotify(id comm.Id)

Unnotify implements comm.Notifier.

func (*Responder) Visible

func (g *Responder) Visible() bool

Visible returns true if the keyboard is visible.

type Type

type Type int

Type defines the kind of keyboard.

const (
	TextType Type = iota
	NumberType
	EmailType
	URLType
	PhoneType
)

func (Type) MarshalProtobuf

func (t Type) MarshalProtobuf() keyboard.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL