mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2025-01-06 03:27:17 +03:00
examples/hello: Also test password text input
This commit is contained in:
parent
650e3b645b
commit
d48e38fe7e
@ -15,16 +15,30 @@ module GUI
|
|||||||
add_main_text(%Q{\nThe description label here will mirror the switch's value.\n})
|
add_main_text(%Q{\nThe description label here will mirror the switch's value.\n})
|
||||||
|
|
||||||
add_textarea().tap do |ta|
|
add_textarea().tap do |ta|
|
||||||
on_click = ->() do
|
on_click = ->() do
|
||||||
puts "clicked"
|
puts "clicked"
|
||||||
end
|
end
|
||||||
ta.on_submit = ->(value) do
|
ta.on_submit = ->(value) do
|
||||||
puts "submitted #{value.inspect}"
|
puts "submitted #{value.inspect}"
|
||||||
puts " -> get_text: #{ta.get_text().inspect}"
|
puts " -> get_text: #{ta.get_text().inspect}"
|
||||||
end
|
end
|
||||||
ta.on_modified = ->(value) do
|
ta.on_modified = ->(value) do
|
||||||
puts "modified #{value.inspect}"
|
puts "modified #{value.inspect}"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
add_textarea().tap do |ta|
|
||||||
|
ta.set_pwd_mode(true)
|
||||||
|
on_click = ->() do
|
||||||
|
puts "clicked"
|
||||||
|
end
|
||||||
|
ta.on_submit = ->(value) do
|
||||||
|
puts "submitted #{value.inspect}"
|
||||||
|
puts " -> get_text: #{ta.get_text().inspect}"
|
||||||
|
end
|
||||||
|
ta.on_modified = ->(value) do
|
||||||
|
puts "modified #{value.inspect}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add a toggle switch
|
# Add a toggle switch
|
||||||
|
Loading…
Reference in New Issue
Block a user