Reimplementing CrytpoNews in Native Android(UPDATE #6: Search Functionality)
The aim of the app is to fetch news from different wordpress websites and display in the application. While the news are displayed, the app gives you the ability to click and view each news within the app. Instead of taking you out of the app, it gives you the comfort of viewing within the
History
Previous Updates
- Reimplementing CrytpoNews in Native Android(UPDATE: Storing News in DB)
- Reimplementing CrytpoNews in Native Android (UPDATE #2 : ADDED SETTINGS CUSTOMIZATION)
- Reimplementing CrytpoNews in Native Android (UPDATE #3 : NETWORK LISTENER)
- Reimplementing CrytpoNews in Native Android(UPDATE #4: Share News Functionality)
- Reimplementing CrytpoNews in Native Android(UPDATE #5: FAVORITE FEATURE ADDED)
New Features
User can now search for Contents in the app
| User can Enter Search Query | The adapter Filters based on Users search query |
|---|---|
| An Empty Screen is shown when nothing is found | Life cycle awareness when the app is rotated, search Query is preserved |
|---|---|
How it was Implemented
The resources for the icons were gotten from google icons. Commit can be found here
Handling Searching was a bit tricky but was achieved by using custom Adapter that implemented Searchable Adapter.
The Search View was instantiated here
searchView.setOnQueryTextListener(this); searchView.setOnQueryTextListener(this);
if (mSearchQuery != null && !mSearchQuery.isEmpty()){
String s = mSearchQuery;
searchItem.expandActionView();
searchView.setQuery(s, false);
searchView.clearFocus();
}
The Fragment implemented a listener which watched for change in the text when the user entered his search query in
onQueryTextChange()method. This method contains thefilter logicwhich used a for loop to scan through the List for matching text. The code for this can be found hereSaving the User search query was very important as i was able to cater for orientation changes in the activity in
onSavedInstanceStatemethod and was restored inonCreatemethod of the activity. This can be found here. Doing this i was able to preserve the fragment it self an the search Query.Other Updates included introducing
Databindingto the architecture i am already using. i am able to bind views direct with the data and it helped reduced a lot of broiler plate. A FragmentBindingAdapter was introduced to help directly bind the data to the xml. (no moresetText() method in our fragment/activity).Major Commit here
Resources
- Github Pull Request- Link of PR can be found here
- Apk for download - Download here
- Versioning on Playstore on the way : Please kindly uninstall previous version before installing this version.
Roadmap
Searching all newsPersisting user newsProviding different layouts- Providing different themes for user
- Push Notifications
News Posts sharing- Incorporating more news and giving the user the flexibility of deciding what he wants to read per time.
Able to save Favorites- Sort News
Leave Reimplementing CrytpoNews in Native Android(UPDATE #6: Search Functionality) to:
Read more #utopian-io posts
Best Posts From Andy Eshiet
We have not curated any of mathemandy's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Andy Eshiet
- The Saturday SteemJet Media Radio show with @mathemandy : Come with all your Traumas
- Day 4 at the National Youth Service Corp
- Day 4 at the National Youth Service Corp
- The Saturday SteemJet Media Radio show with @vheobong hosted by @surpassinggoogle - 3PM GMT (4PM WAT)
- The Saturday SteemJet Media Radio show with @mathemandy hosted by @langford - 5-7PM GMT
- Reimplementing CrytpoNews in Native Android(UPDATE #6: Search Functionality)
- Reimplementing CrytpoNews in Native Android(UPDATE #5: FAVORITE FEATURE ADDED)
- WHY YOU NEED TO JOIN WHALESHARES DISCORD
- Reimplementing CrytpoNews in Native Android (UPDATE #3 : NETWORK LISTENER)
- Happy birthday Esther James
- Reimplementing CrytpoNews in Native Android (UPDATE #2 : ADDED SETTINGS CUSTOMIZATION)
- Broken Image Link in App (No Image)
- App Crashes when back button is Clicked
- Loss of progress/data when orientation Changes
- Ability to Show Error Messages as Toast, Use of SnackBar or Error on the Editext Field
- Suggestion : Adding Log out feature to Dtube Unofficial
- Suggestion : Error Feedback when user tries to login with incorrect details or absence of internet
- Unable to Log out from Dtube Unofficial
- SUGGESTIONS: Including Sort icon and Progressbar in Mixion App
- Clicking on "Powered by AskMe" in SearchView Activity Opens details of Post on the Home Activity