soupslurpr / AppVerifier

Verify apps easily.
ISC License
217 stars 15 forks source link

[MERGED] Add basic search #122

Closed felschr closed 7 months ago

felschr commented 7 months ago

Closes #48

I'm not really an Android or Kotlin dev, so this probably needs some clean up but I kinda got a search bar implemented. It uses an experimental Material 3 API, not sure if that's a deal-breaker for you.

soupslurpr commented 7 months ago

Thanks, one problem I see is that it seems to only filter with the package name, and not the name of the app. I think it should give results from searching both the package name and the name at the same time. If you'd like I can continue off from here and finish it myself! I had no idea Compose had an experimental search bar component 😆

soupslurpr commented 7 months ago

Also it should be attached to the top of the screen always instead of going away when scrolling down, perhaps adding a top bar or just moving it out of the LazyColumn.

felschr commented 7 months ago

I've just added an icon, a placeholder, made it sticky & made it search both the normal name as well as the package name. I've adopted a Scaffold which already takes care of the spacing for the OS's navigation bar, so I removed the extra Spacer.

Here is what it looks like:

appverifier-search

soupslurpr commented 7 months ago

Thanks again :), just made a few minor adjustments like moving the searchQuery to AppVerifier.kt and in rememberSaveable to save its state on configuration changes (rotating, changing size, etc), fixing edge-to-edge by adjusting LazyColumn innerPadding to not include the bottom padding (edge-to-edge is when it is immersive, the bottom padding for the navigation bar is removed and the spacer was for adding a navigation bar at the bottom of the app list so that there aren't any unreachable entries (especially happens when using the old 3 button navigation)), and clearing searchQuery when going back to StartupScreen.

soupslurpr commented 7 months ago

merged in https://github.com/soupslurpr/AppVerifier/commit/12c9b1b58c3d2ee4e67728ec2081da920c4f1d4e

soupslurpr commented 7 months ago

Oops I messed up when merging it so it says it twice