Class: TextViewWrapper

Inherits:
ViewWrapper show all
Defined in:
lib/droiuby/wrappers/text_view.rb

Direct Known Subclasses

ButtonWrapper, EditTextWrapper

Instance Method Summary collapse

Methods inherited from ViewWrapper

#animate, #background=, #background_color=, #blink, #builder, #click, #data, #enabled=, #enabled?, #find, #gone=, #gone?, #height=, #hidden?, #hide!, #initialize, #invalidate, #native, #p_tree, #parent, #show!, #tag, #to_front!, #to_native, #visible=, #visible?, #width=

Methods included from Droiuby::Wrappers::Listeners

#on

Methods included from Droiuby::ViewHelper

included

Methods included from JavaMethodHelper

included

Constructor Details

This class inherits a constructor from ViewWrapper

Instance Method Details

#textObject



11
12
13
# File 'lib/droiuby/wrappers/text_view.rb', line 11

def text
    @view.getText
end

#text=(text) ⇒ Object



7
8
9
# File 'lib/droiuby/wrappers/text_view.rb', line 7

def text=(text)
    @view.setText(text.to_s)
end

#text_colorObject



19
20
21
# File 'lib/droiuby/wrappers/text_view.rb', line 19

def text_color
  @view.getCurrentTextColor
end

#text_color=(value) ⇒ Object



23
24
25
# File 'lib/droiuby/wrappers/text_view.rb', line 23

def text_color=(value)
  @view.setTextColor(parse_color(value));
end

#text_size=(size) ⇒ Object



15
16
17
# File 'lib/droiuby/wrappers/text_view.rb', line 15

def text_size=(size)
  @view.setTextSize(Java::android.util.TypedValue::COMPLEX_UNIT_DIP,size.to_f)
end