Monday, February 24, 2014

Layout preview improvements

The problem with layout rendering is the most popular bug in issues tracker at BitBucket. I am well aware of that and recently I made a few changes to again make it more robust and basically attempted to be able to render a layout with some reasonable defaults without manual setting. Still there are assumptions like:
it expects that the project is built (to load identifiers from generated R.java and possibly project/library widgets), it needs to be able to parse AndroidManifest.xml from project, it will guess what is the best target platform to use for rendering and will use a default device (Nexus 4), its state (PORTRAIT), theme and so on. You can give it another try. Reminder: the AUC link is now http://nbandroid.org/updates/updates.xml.

Unrelated to that is that I was able to improve tests to run multiple times again different versions of Android target platforms. This is nice as it helps to make sure that new updates do not break existing functionality. This is done using AbstractMultiTestRunner from Gradle project - pretty smart class.

Friday, February 14, 2014

Instrumentation test runner

I am surprised that there were no other complaints sooner but for a long time it was not possible to specify instrumentation test runner and our plugin always used the default one. Well, this is changed now and you can customize this for your Android Test projects in a 'Run' tab of project customizer.

Future improvements are possible but at least the simple support is now enabled. Adding suggestion based on AndroidManifest.xml parsing can be added. I also have to thank Rob Smith for his input on this.

Note: the updated version is available from an update center announced in previous post.

Thursday, February 13, 2014

Java 7 is required now

There are several important changes in the latest update of NBAndroid plugin:

  • Java 7 is now required as JDK used to run NetBeans. If you use NetBeans 7.4 or newer then there is no other way. If you are using NetBeans 7.3 (or 7.2) make sure your IDE is running with Java 7.
  • NetBeans 7.3 is used as base for building the plugin. It is possible that some builds will remain compatible with NetBeans 7.2 but sooner or later some dependency will break this. Version 8.0 is already in beta so you should upgrade.
  • Related to these news is a change in AutoUpdate URL. Please update your settings in Plugin Manager to use link http://nbandroid.org/updates/updates.xml