how can I put a newline into a format string

by Mark Murphy » Tue, 09 Mar 2010 04:00:16 GMT


Sponsored Links
 


Out of curiosity -- where are you seeing this list of supported HTML
tags? Html.fromHtml() mentions special handling of <img> but otherwise
does not mention any specific tags it supports. If there is a definitive
list for it, I'd love to know!


Personally, I didn't even realize that existed. Thanks!

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Training...At Your Office:  http://commonsware.com/training 

--



how can I put a newline into a format string

by Mark Murphy » Thu, 11 Mar 2010 11:07:15 GMT


 


10, actually -- 9 on the second page you linked to, plus <img> as
mentioned in Html.fromHtml()'s documentation. And I know that <font>
works, at least for the color attribute, based on some StackOverflow
support issues.

And examining the source code, in addition to the above, I see
references to <div>, <p>, <blockquote>, <font size="" face="">, <em>,
<strong>, <cite>, <dfn>, <h1> through <h6>, ...and <br>. <br> is
supposed to inject \n as a newline.

In a nutshell, the docs are out of sync with the source.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

_Beginning Android_ from Apress Now Available!

--


Sponsored Links


Other Threads

1. How to open fb0 from App?

I want to open fb0 through JNI.But don't hava permission to open.

Why openGL has the permission to open fb0?

-- 

2. Recommended way of passing callback context data between activities

Hi,

Quite often when I launch an Activity using startActivityForResult I 
need to store some context data that will be needed in my 
onActivityResult implementation. (e.g., a reference to some in memory 
data that will be modified after the child activity finishes). The data 
in question is transient by nature so it's not already stored in a db 
somewhere.


Up until now I was simply storing data in a field of the parent 
activity, however this isn't reliable as this wont survive a restart of 
the parent activity (e.g., when a config change happens).
In some of my code I've handled this by passing a PendingIntent (created 
using Activity#createPrendingResult) to the child activity where I 
stored all the context data in the intent extras. This works for my own 
code, but is not generally usable since most of the platform provided 
activities don't support this way of working.
The only other alternative I've been able to come up with is storing the 
data in a database or making sure I store the fields when 
Activity#onSaveInstanceState.


All the options I listed above feel like more work than I would like to 
do for something that seems rather common. Does anyone have a simpler 
solution to this problem or is there a recommended best practice that I 
can follow?


Regards,

Pepijn

--

3. how to add omx decoders into stagefright of gingerbread

4. about the samsung android git address

5. How to transfer real-time data to mobile by USB and how to get the transfered data

6. How to write a android keyboard preference and show in Android Setting > Language & Keyboard.

7. Relief view on mapActivity?