-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.1.0/AN_FEAT] 바이옴 리스트 검색 기능 구현 (#320)
* feat: toolbar에 검색 아이콘 넣기 * feat: biome repository 검색 구현 * feat: biome 리스트 검색 바인딩 어뎁터 * test: 바이옴 조회 repository 테스트 작성 * feat: 바이옴 검색 기능 구현 * feat: 검색시 리싸이클러뷰 스크롤 항상 맨위로 이동 * feat: 키보드 아웃포커싱 내리기 * style: ktFormat * refactor: 리싸이클러뷰 스크롤 위치 이동 * style: ktFormat
- Loading branch information
Showing
10 changed files
with
116 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
android/app/src/main/java/poke/rogue/helper/presentation/biome/BiomeQueryHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package poke.rogue.helper.presentation.biome | ||
|
||
interface BiomeQueryHandler { | ||
fun queryName(name: String) | ||
} |
22 changes: 22 additions & 0 deletions
22
...d/app/src/main/java/poke/rogue/helper/presentation/biome/BiomeSearchViewBindingAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package poke.rogue.helper.presentation.ability | ||
|
||
import androidx.appcompat.widget.SearchView | ||
import androidx.databinding.BindingAdapter | ||
import poke.rogue.helper.presentation.biome.BiomeQueryHandler | ||
|
||
@BindingAdapter("onQueryTextChange") | ||
fun setOnQueryTextListener( | ||
searchView: SearchView, | ||
onQueryTextChangeListener: BiomeQueryHandler, | ||
) { | ||
searchView.setOnQueryTextListener( | ||
object : SearchView.OnQueryTextListener { | ||
override fun onQueryTextSubmit(query: String?): Boolean = false | ||
|
||
override fun onQueryTextChange(newText: String?): Boolean { | ||
onQueryTextChangeListener.queryName(newText.toString()) | ||
return true | ||
} | ||
}, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters