Are there any search bar tutorials or a resource that covers search bars so i can use in my project? [import]uid: 132369 topic_id: 35410 reply_id: 335410[/import]
yes
i am waiting to see it also
waiting for it.
Keat
What are you searching for? The UI for a search bar is pretty simple… Something like this
[lua]
searchIcon = display.newImageRect(searchGroup,“assets/search-icon.png”, 48, 48)
searchIcon.x, searchIcon.y = display.contentWidth-68, 64)
searchField = native.newTextField( 64, 80, display.contentWidth-128-48, 55, searchTouch)
searchField.font = native.newFont( native.systemFont, 12, onSearchField)
searchField.text = “”
searchField.inputType = “default”
local function searchTouch( event )
if ( “ended” == event.phase ) then
onSearchUpdate()
end
end
searchIcon:addEventListener( “touch”, searchTouch)
[/lua]
Then you just use onSearchUpdate to perform your search.
this code is working fine,
thank for your sharing
now i am working on the search Update
Keat
yes
i am waiting to see it also
waiting for it.
Keat
What are you searching for? The UI for a search bar is pretty simple… Something like this
[lua]
searchIcon = display.newImageRect(searchGroup,“assets/search-icon.png”, 48, 48)
searchIcon.x, searchIcon.y = display.contentWidth-68, 64)
searchField = native.newTextField( 64, 80, display.contentWidth-128-48, 55, searchTouch)
searchField.font = native.newFont( native.systemFont, 12, onSearchField)
searchField.text = “”
searchField.inputType = “default”
local function searchTouch( event )
if ( “ended” == event.phase ) then
onSearchUpdate()
end
end
searchIcon:addEventListener( “touch”, searchTouch)
[/lua]
Then you just use onSearchUpdate to perform your search.
this code is working fine,
thank for your sharing
now i am working on the search Update
Keat