Html with ArrayAdapter<CharSequence>

by MewT » Sat, 27 Feb 2010 07:43:47 GMT


Sponsored Links
 Hi !
I've a problem with Android 1.5 and all the previous versions.

Simply, I have a ListView with an ArrayAdapter<CharSequence> but when
I instantiate a CharSequence with Html.fromHtml (for example "<b>Hi!
How are you?</b>") and i put this CharSequence into the ArrayAdapter
with the method add(), if the version of Android if lower than 1.6,
the ListView is colorless. I don't see the colors, underline ... But
with Android 1.6, I don't have this problem.

I've saw the changelog between 1.5 and 1.6 but nothing ... :s

Any ideas?

--



Other Threads

1. "back" button when in ListActivity causes runtime exception

When my ListActivity is active and I press the "back" button (in the
Droid simulator), my application stops with a runtime exception. The
stack trace looks like this:

ActivityThread.performDestroyActivity(IBinder, boolean, int, boolean)
line: 3421
ActivityThread.handleDestroyActivity(IBinder, boolean, int, boolean)
line: 3487
ActivityThread.access$2800(ActivityThread, IBinder, boolean, int,
boolean) line: 119
BinderProxy(ActivityThread$H).handleMessage(Message) line: 1896
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4363
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 860
ZygoteInit.main(String[]) line: 618
NativeStart.main(String[]) line: not available [native method]

And according to the log, there's a timeout when the ActivityManager
is trying to destroy my ListActivity:

W/ActivityManager(   56): Activity destroy timeout for
HistoryRecord{43d8cac8 com.shipmate/.EventList}

I verified with breakpoints in the de{*filter*} that the ListActivity
"onDetroy" method is never being called. What should be my next
debugging step?

-- 

2. Adding an Intent to a Sync'd account option in a contact

Hey,

I am playing about with the sample code in android dev resources, the
sampleSyncAdapter.

I have it inserting a sampleSyncAdapter entry into my contact.
however, when I click on this I would like to define an activity for
it to open...

in the adb log it currently states (because  have not defined the
activity):
ViewContact(11201): No activity found for intent: Intent
{ act=android.intent.action.VIEW dat=content://com.android.contacts/
data/5045 }


Looking at the face book entry in the same contact, when I click on
that, this is the intent that is fired:
Starting activity: Intent { act=android.intent.action.VIEW
dat=content://com.android.contacts/data/2904
cmp=com.facebook.katana/.ProfileTabHostActivity }


I was wondering if anyone had any idea how/where to define an activity
to handle the click on the custom contact option, like face book
define the .ProfileTabHostActivity?

Any help appreciated,

Thanks,
Marc




-- 

3. Recieveing a notification when an activity is launched

4. chrome

5. Beli Aplikasi di market tanpa harus ROOTED?

6. Mirink di Yogya

7. init.rc commands not interprete