aurelhubert / aurelhubert/ahbottomnavigation
AHBottomNavigation#createItems() function called too many times
- Dominant language
- Java
- Stars
- 3.8k
- Forks
- 672
- PR merge metrics
- No merged PRs in 30d
Description
The [AhBottomNavigation#createItems](https://github.com/aurelhubert/ahbottomnavigation/blob/master/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java#L148) is called each time we add a single item or when we change a view parameter.
Wouldn't it be possible to call it in a more adapted way for optimizing the view ?
Potential solutions:
- Concerning the colors and other parameters, one could use use [http://developer.android.com/training/custom-views/create-view.html#customattr](custom attributes) in order to set the params directly in the xml.
- Having an update function for changing just what is needed when we change a parameter.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java at createItems() and inspect each caller that adds an item or changes a view parameter. Reproduce the repeated calls, then determine and verify a narrower update path that preserves item and parameter behavior without rebuilding the view unnecessarily.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100