I am developing a wallpaper app that loads it's images from Picasa I have a Navigation drawer that retrieves it's items name from the Picasa album names (I am using the source code of this tutorial Link ), so I want to add a search bar that filters the items in the navigation drawer, any idea on how I could accomplish this?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
It might be a little late. But may help others.
Add an EditText to navigation Drawer.(activity_main.xml)
add a TextWatcher to editText. (Add the following lines to
onCreate
)Hope this helps.
You can make your navigation drawer a
Fragment
that contains anArrayAdapter
, which implementsFilterable
. This adapter would contain list of your Picasa album names.For the search box, a simple
EditText
would do the job. Register aTextWatcher
that would listen to text change events and triggerFilter.filter()
on aFilter
returned from yourArrayAdapter.getFilter()
with input text as query.