Skip to main content

Posts

Showing posts with the label ice-cream-sandwich

How do I fix Html.fromHtml link focus visibility problems (in ICS and Honeycomb)?

To get a TextView to display (and act friendly with) Html strings my code looks something like: // itemHtml is a String of HTML defined above TextView itemContent = (TextView) findViewById(R.id.itemContent); itemContent.setText(Html.fromHtml(itemHtml)); itemContent.setMovementMethod(LinkMovementMethod.getInstance()); If the Html string has a link, TextView results in links that are clickable and focusable. When the user focuses on a specific link (e.g. by using the d-pad), the link text changes in some significant way to show that focus was obtained. The problem is that when I test this same pattern using devices with a d-pad using Honeycomb (e.g. a Google TV) or Ice Cream Sandwich flavors of Android, the link in the text shows no noticeable indication that the link has focus. I know it is getting focus, because when you then hit enter it does the specified action. You can even move around between various links in the text; you're just left guessing which link you're

PreferenceActivity background in ics is gone during scroll

i'm using PreferenceActivity in my app for settings and when tried to set a background and it looks fine untill the user scroll. during the scroll there is background only below the text (see links to images below) after the scroll it goes back to how it was before (the way it should look) the problem happens only on ics (on nexus one it works fine) did anyone saw that problem before and know how to fix it? thanks. thats how it looks before scrolling http://i.stack.imgur.com/4aPKX.png and thats how it looks during scrolling http://i.stack.imgur.com/zDbgU.png