Closed Bug 699312 Opened 11 years ago Closed 11 years ago
Selected tab should be bold in the tabs-list
The selected tab should be shown in bold in the list of tabs shown.
Assignee: nobody → sriram
OS: Linux → Android
Hardware: x86 → ARM
This patch makes the selected tab bold in the list. I tried make the title bold when the view is created. However, it had weird issues that I couldn't understand. The first item in the list is always bold along with the selected tab in the list. Probably some race conditions, I believe. I tried using onWindowFocusChanged in activity -- as this is when the list gets populated -- however, this doesn't help us when the tabs gets updated in the background. The background changes of url/title, causes the list to render again, and we don't know if that has happened yet. thisList.setAdpater() doesn't ensure that views are created immediately after this call. The last option was to use a Handler to update the views after a timeout. I've used a 10ms timeout and this works fine with my slow Nexus S. There is a method addOnLayoutChangeListener() with ListView, but this is available only from API Level 11. I would be happy to change the logic, if we can find a better solution by adding bold when view is created itself.
The previous patch had a wrong bug number in the message.
This works fine now :) I forgot the "resusability" nature of convertView, which caused all issues initially. Now, the views are not reused (and there is no need to reuse smaller views with text and image) and the fix is even simpler. There is no flickering while tab updates in the background.
Attachment #571560 - Flags: review?(mark.finkle) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Mozilla/5.0 (Android; Linux armv7l; rv:10.0a1) Gecko/20111003 Firefox/10.0a1 Fennec/10.0a1 Samsung Nexus S (Android 2.3.6)
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.