How to highlight the background of a textView

by manoj » Fri, 02 Jan 2009 05:44:28 GMT

Sponsored Links
 Hi friends,

I am using LinearLayout. I am adding some texts to this layout (as a

When I click the particular text, its background should be changed to
some colour.

I am using the code like:

View text = parent_layout1.findViewById(;

But the background is not highlighted, showing only blank screen.

How do I achieve my goal.

Can any one please help me.

Manoj Kumar.M.


Other Threads

1. Private Messaging

Hi All,

1. I'd like to know more about Android SMS. Let me know some related
article links.

2. all sending and receiving sms is stored in where?
Is it stored under content?
public static final Uri SMS_INBOX = Uri.parse("content://sms/");

3. Is Messaging chatting style simply created by xml file under /res/
layout? Please kindly share me a sample code or online article link.

4. I'd like to intercept any sms receiving and allow to read these sms
privately based on private contact list. So I have to create or store
any receiving sms from these private contact list in SQLite database
and then delete it from content. Is my idea correct?


2. Redrawing Widget When Changing Orientation


I have a widget set up and it displays properly in both portrait and
landscape when added to each. But when I change orientation it has the
problem "Problem Loading Widget". I delete this, re-add the widget,
and it displays correctly. Thus, my widget can support both portrait
and landscape but it doesn't survive an orientation switch.

What am I missing? Do I need to redraw the widget when orientation is
changed? Doesn't it do this automatically? Do I need to call
onUpdate() somehow?

Thank you!



3. How to get my "actual" IP address on emulator

4. How to get my "actual" IP address on emulator

5. JNI stdout, stdin

6. How to add new resources subfolder in Eclipse?

7. How to warn user when back button is pressed to navigate out of my application?