android

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PagerButton

type PagerButton struct {
	Title string
}

func (*PagerButton) OptionKey

func (t *PagerButton) OptionKey() string

type PagerView

type PagerView struct {
	view.Embed
	Pages *Pages
	// contains filtered or unexported fields
}

func NewPagerView

func NewPagerView() *PagerView

NewPagerView returns a new view. ViewPager and PagerTabStrip.

func (*PagerView) Build

func (v *PagerView) Build(ctx view.Context) view.Model

Build implements the view.View interface.

func (*PagerView) Lifecycle

func (v *PagerView) Lifecycle(from, to view.Stage)

Lifecyle implements the view.View interface.

type Pages

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

Pages represents a list of views to be shown in the PagerView. It can be manipulated outside of a Build() call.

func (*Pages) Notify

func (s *Pages) Notify(f func()) comm.Id

Notify implements the comm.Notifier interface.

func (*Pages) SelectedIndex

func (s *Pages) SelectedIndex() int

SelectedIndex returns the index of the selected tab.

func (*Pages) SelectedView

func (s *Pages) SelectedView() view.View

func (*Pages) SetSelectedIndex

func (s *Pages) SetSelectedIndex(idx int)

SetSelectedIndex selects the tab at idx.

func (*Pages) SetViews

func (s *Pages) SetViews(ss ...view.View)

SetViews sets the child views displayed in the tabview.

func (*Pages) Unnotify

func (s *Pages) Unnotify(id comm.Id)

Unnotify implements the comm.Notifier interface.

func (*Pages) Views

func (s *Pages) Views() []view.View

Views returns the child views displayed in the tabview.

type Stack

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

Stack represents a list of views to be shown in the StackView. It can be manipulated outside of a Build() call.

func (*Stack) Notify

func (s *Stack) Notify(f func()) comm.Id

func (*Stack) Pop

func (s *Stack) Pop()

func (*Stack) Push

func (s *Stack) Push(vs view.View)

func (*Stack) SetViews

func (s *Stack) SetViews(vs ...view.View)

func (*Stack) Unnotify

func (s *Stack) Unnotify(id comm.Id)

func (*Stack) Views

func (s *Stack) Views() []view.View

type StackBar

type StackBar struct {
	Title          string
	StyledTitle    *text.StyledText
	Subtitle       string
	StyledSubtitle *text.StyledText
	Color          color.Color
	Items          []*StackBarItem
}

func (*StackBar) OptionKey

func (t *StackBar) OptionKey() string

type StackBarItem

type StackBarItem struct {
	Title       string
	StyledTitle *text.StyledText
	Icon        image.Image
	IconTint    color.Color
	Enabled     bool
	OnPress     func()
}

func NewStackBarItem

func NewStackBarItem() *StackBarItem

type StackView

type StackView struct {
	view.Embed
	Stack *Stack
	// contains filtered or unexported fields
}

func NewStackView

func NewStackView() *StackView

NewStackView returns a new view.

func (*StackView) Build

func (v *StackView) Build(ctx view.Context) view.Model

Build implements the view.View interface.

func (*StackView) Lifecycle

func (v *StackView) Lifecycle(from, to view.Stage)

Lifecyle implements the view.View interface.

type StatusBar

type StatusBar struct {
	Style StatusBarStyle
	Color color.Color
}

If multiple views have a statusBar, the most recently mounted one will be used. UIViewControllerBasedStatusBarAppearance must be set to False in the app's Info.plist to use this component.

return view.Model{
    Options: []view.Option{
        &android.StatusBar{ Color: colornames.Red },
    },
}

func (*StatusBar) OptionKey

func (s *StatusBar) OptionKey() string

type StatusBarStyle

type StatusBarStyle int
const (
	// Statusbar with light icons
	StatusBarStyleLight StatusBarStyle = iota
	// Statusbar with dark icons
	StatusBarStyleDark
)

Jump to

Keyboard shortcuts

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