Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Talk:Creating LCDUI Custom Components: CategoryBar

From Wiki
Jump to: navigation, search

Hamishwillee - Subedited/Reviewed

Hi Tomi

Really nice article again. I've given it a minor subedit for wiki style and to improve readability (IMO). Wouldn't have been a problem if I'd left as was as most of the changes are for taste. Anyway, please check.

So general stuff, I like the abstract to be one line if possible - hence that change! I use "thumb" or "frame" for single images other than gallery.

Wasn't sure what categories to use - but decided that even though this has some useful code working with "Files/Data on Java ME", mostly this is not an article about files data and so doesn't belong there. It does belong in LCDUI and "Graphics on Java ME". I am considering whether we also need another category "Custom Components in Java ME" (Thoughts?)

In terms of "room for improvement", again I would suggest you talk to Stratos. Most of it made sense to me as a "non Java developer". I did think "However, when you want to access the new methods of the custom category bar, it has to be cast into itself." might be worth showing and also that " CustomCategoryBar.getNewInstance" implementation might be useful if this is something that again shows of the detail of how the inner class abstraction works.

In the draw function you do:

       graphics.drawString(TAB_TITLES[_categoryBar.getSelectedIndex()], MARGIN, MARGIN,
           Graphics.TOP | Graphics.LEFT);
       _categoryBar.paint(graphics, getHeight() - CustomCategoryBar.HEIGHT);

I didn't understand this - firstly why doesn't the categorybar paint its own tab titles? Secondly, why is the bar drawn after (and presumably over) the text? Probably something a Java person would just understand.



hamishwillee 06:56, 28 June 2013 (EEST)

Tomi - Thanks

You make very good points. I'll try to address them at some point.

About the draw function: The category bar does not care about what it is used for. It doesn't know or care what tab is shown. Paint the content of the tab is the responsibility of the canvas. Tab titles are drawn on the top and the bar itself on the bottom so they won't overlap.

I'm not sure how many wiki articles would fall under the "Custom Components" category. Might want to wait and see if there will be more.



Tomi_ 12:16, 28 June 2013 (EEST)

Hamishwillee - Thanks

Thanks for explaining the category bar - makes sense. Might be worth making the point in the article - up to you.

hamishwillee 07:57, 1 July 2013 (EEST)


Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.