Sunday, October 14, 2012

Layout preview refining


There are few improvements since the last week in my current branch. It is possible to render some layouts using custom view classes and customize the view to display output according to selected device configuration and Android version. Also there is a possibility to switch language and region settings, landscape/portrait and dock modes. The whole thing seems more stable now.
What remains on my list to be done before I create first public version:

  • Polish the UI (including error reporting when something goes wrong because there are plenty of ways how things can end up badly).
  • Theme support for platform and project themes.
  • Better integration with the editor to be able to update after save or possibly as you type.
Things that will be part of future updates:

  • Fragment support.
  • Maven project support (if there is demand).
  • Zooming in preview.

Sunday, October 7, 2012

Progress on layout preview

Here is a teaser. I resumed my older attempt to create a preview support for Android UI layouts. As you probably know other IDEs are better in this area so it is time to close the gap a bit.

Of course what you can see on the picture is not ready for general consumption yet but I'd like to make some restricted version available soon. Incomplete list of things that need to be done looks like this:
  • Fix UI glitches in sizing and positioning of rendered layout, better integrate into NetBeans window system and generally provide better feedback. 
  • More complete set of customization controls to let you select locales, modes, themes, and so on.
  • The prototype works for layouts using widgets from SDK and is not aware of project items. It needs to parse and resolve project resources and be able to instantiate project classes.
  • Tie it together with editor and refresh the layout as the source file is edited.
  • Probably there is more like ability to display fragments.
  • Far ahead is GUI designer where you can edit layout.
While there can be some sponsoring for this feature it is still voluntarily work. The code is open source and available in the repository even for this branch. It means people can contribute. Monetary contribution are also accepted (see the donate button on the right side?). At the end I am also considering an option to distribute the GUI support for some small amount of money only.