class RMQTextViewStyler
Public Instance Methods
color=(text_color)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 29 def color=(text_color) @view.textColor = convert_color(text_color) end
enabled=(enabled)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 46 def enabled=(enabled) @view.setEnabled(enabled) end
finalize()
click to toggle source
Calls superclass method
RMQViewStyler#finalize
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 50 def finalize super if @lazy_typeface @text_style ||= Android::Graphics::Typeface::NORMAL typeface = Android::Graphics::Typeface.create(@font_family, @text_style) if @font_family @view.setTypeface(typeface, @text_style) # ok for typeface to be nil end end
font=(rmq_font)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 37 def font=(rmq_font) @view.setTypeface(rmq_font.to_typeface, rmq_font.sdk_text_style) @view.textSize = rmq_font.size end
font_family=(font_family)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 6 def font_family=(font_family) @font_family = font_family @lazy_typeface = true end
gravity=(gravity)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 42 def gravity=(gravity) @view.gravity = convert_gravity(gravity) end
text=(text)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 33 def text=(text) @view.text = text end
text_color=(text_color)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 26 def text_color=(text_color) @view.textColor = convert_color(text_color) end
text_size=(text_size)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 2 def text_size=(text_size) @view.textSize = text_size end
text_style=(text_style)
click to toggle source
# File lib/project/ruby_motion_query/stylers/rmq_text_view_styler.rb, line 11 def text_style=(text_style) @text_style = case text_style.to_s.downcase when "bold" Android::Graphics::Typeface::BOLD when "italic" Android::Graphics::Typeface::ITALIC when "bold italic" Android::Graphics::Typeface::BOLD_ITALIC when "normal" Android::Graphics::Typeface::NORMAL end @lazy_typeface = true end