Class: Rho::NativeTabbar

Inherits:
Object show all
Defined in:
lib/framework/rho/rhotabbar.rb,
lib/framework/autocomplete/Rho.rb,
lib/commonAPI/coreapi/RhoNativeTabbarApi.rb

Class Method Summary collapse

Class Method Details

.create(params, options = {}, callback = nil) ⇒ Object



32
33
34
# File 'lib/framework/rho/rhotabbar.rb', line 32

def self.create(params)
  NativeBar.create_native_tabbar(Rho::RhoApplication::TABBAR_TYPE, params)
end

.create_origObject



9
10
11
# File 'lib/commonAPI/coreapi/RhoNativeTabbarApi.rb', line 9

def self.create(params)
  NativeBar.create_native_tabbar(Rho::RhoApplication::TABBAR_TYPE, params)
end

.create_vertical(params) ⇒ Object



36
37
38
# File 'lib/framework/rho/rhotabbar.rb', line 36

def self.create_vertical(params)
  NativeBar.create_native_tabbar(Rho::RhoApplication::VTABBAR_TYPE, params)
end

.get_current_tabObject



52
53
54
55
56
57
58
59
# File 'lib/framework/rho/rhotabbar.rb', line 52

def self.get_current_tab
    webview = System::get_property('webview_framework')
    if System::get_property('platform') == 'APPLE' or System::get_property('platform') == 'ANDROID' or (!webview.nil? and webview.start_with?('WEBKIT'))
        return NativeBar.native_tabbar_get_current_tab
    else 
        return 0
    end
end

.removeObject



40
41
42
# File 'lib/framework/rho/rhotabbar.rb', line 40

def self.remove()
  NativeBar.remove_native_tabbar()
end

.set_tab_badge(tab_index, value) ⇒ Object



48
49
50
# File 'lib/framework/rho/rhotabbar.rb', line 48

def self.set_tab_badge(tab_index, value)
  NativeBar.native_tabbar_set_tab_badge(tab_index, value)
end

.switch_tab(tab_index) ⇒ Object



44
45
46
# File 'lib/framework/rho/rhotabbar.rb', line 44

def self.switch_tab(tab_index)
  NativeBar.native_tabbar_switch_tab(tab_index)
end