Code example for SubMenu

Methods: add, addSubMenu, getItem, setGroupCheckable, setHeaderTitle

0
      subPreview.add(1,VIEW_MODE_CANNY,0,"Canny edges");
      subPreview.setGroupCheckable(1, true, true);
       
      SubMenu subCompression = menu.addSubMenu("Compression");
//      subCompression.add(2,IMAGE_TRANSPORT_COMPRESSION_NONE,0,"None"); 
      subCompression.add(2,IMAGE_TRANSPORT_COMPRESSION_PNG,0,"Png");
       
      SubMenu subCompressionRate = subCompression.addSubMenu(2,IMAGE_TRANSPORT_COMPRESSION_JPEG,0,"Jpeg");
      subCompression.setGroupCheckable(2, true, true);
      subCompressionRate.setHeaderTitle("Compression quality");
      subCompressionRate.getItem().setChecked(true);
      subCompressionRate.add(3,50,0,"50");
      subCompressionRate.add(3,60,0,"60");
      subCompressionRate.add(3,70,0,"70");
      subCompressionRate.add(3,80,0,"80").setChecked(true);
      subCompressionRate.add(3,90,0,"90");
      subCompressionRate.add(3,100,0,"100");
      subCompressionRate.setGroupCheckable(3, true, true);
 
      return true; 
  } 
 
  @Override