Blackberry: how to change size of font at browser field on OS 5.0? -


on others versions of platform use this:

browserfieldconfig cfg = new browserfieldconfig(); cfg.setproperty(browserfieldconfig.navigation_mode,     browserfieldconfig.navigation_mode_pointer); cfg.setproperty(browserfieldconfig.javascript_enabled, boolean.true); cfg.setproperty(browserfieldconfig.connection_manager, _browseradapter); cfg.setproperty(browserfieldconfig.cookie_manager ,_browseradapter);  browserfield = new browserfield(cfg); browserfield.getrenderingoptions().setproperty(renderingoptions.core_options_guid,          renderingoptions.minimum_font_size, fontsize); 

, , works fine. doesn't work on 5.0 only.

can problem or suggest method change size of font? appreciated.

you may consider inject css rules in browserfield as:

string style    = ""; // here css rules string textbody = ""; // here displaying text  string browsercontent = "<html><style>" + style + "</style>" + textbody + "</html>";   byte[] contentbytes;         try {     contentbytes = browsercontent.getbytes("utf-8");     browserfield.displaycontent(contentbytes, "text/html; charset=utf-8", ""); } catch (...) {         ... } 

in manner may change dinamically text size (and other) replacing injected css style.


Comments

Popular posts from this blog

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -

c# - Getting per connection bandwidth statistics -

jquery - ajax and php updating mysql -