Android dev: handling touch events on custom views

Embarrassingly this tripped me up for a while. In a custom view there were only single “click” events being called when a finger was dragged across the screen. This was due to the return value from the method being false (default in eclipse when you choice source: override methods. Changing it to true means that… Continue reading Android dev: handling touch events on custom views

Android dev: app navigation using back button

The back button can be used to navigate within an application. The easiest way to do this is to define multiple activities. Activities can be moved into using action buttons etc, and then can be exited using the back button. This should work to any number of levels. Activities are defined in AndroidManifest.xml. Below is… Continue reading Android dev: app navigation using back button

Java look and feel class loading with OSGI

First some background… Java look and feels can be specified on the command line using the property “swing.defaultlaf”. This property gives the fully qualified classname of the look and feel to load. java -Dswing.defaultlaf=com.example.foo.FooLookAndFeel -jar app.jar This class is loaded by javax.swing.UIManager. The loading is lazy, in that it is loaded the first time UIManager… Continue reading Java look and feel class loading with OSGI

Published
Categorized as geek Tagged ,

ToolTips not shown over JWindows

Tooltips not shown on components placed in JWindows. The fix/workaround is the following line somewhere in your application startup. UIManager.getDefaults().put(“ToolTipManager.enableToolTipMode”, “”); ToolTipManager only requires keyboard focus to show tooltips when the property ToolTipManager.enableToolTipMode is set to “activeApplication”. JWindow widgets do not appear to get keyboard focus in the same way top level JFrames do. References… Continue reading ToolTips not shown over JWindows

Published
Categorized as geek Tagged ,