Search code examples
codenameonetitlebar

Codename one back command with only arrow image


Some mobile system as iOs based ones (iThings) have no back touchable button, so a Back command must be putted in every single window. In English the word Back is fine, but in other languages it may be big enough to hide more than half the title of the scene, but if i leave it in blank it wont work. Is there a way yo put just a simple arrow pointing back so iPhone users may have a way to get back, maybe a constant?


Solution

  • Instead of just blank, add a space or 2.

    Command back = new Command("  ") {
    
        @Override
        public void actionPerformed(ActionEvent evt) {
            //navigation here
        }
    };
    back.putClientProperty("BackCommand", true);