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. ListView item stay selected

I have a listview and i want when i select a row to stay selected
after googling i came to this solution:
protected void onListItemClick(ListView l, View v, int position, long
id) {
    // ... rest of the code
I just manually set the selected view to stay selected. This works :).
The problem is that if i change some attribute ( for example
v.setBackgroundColor(Color.BLACK) ) the selected view no longer stays
Any ideas how to fix this.

2. Is there any way to delete an application from MarketPlace?

Hi all,
I submitted my adc apk to MarketPlace by mistake. When I reliazed it, I
found that I can't delete it from MarketPlace, so that I can't submit the
same apk to adc site because it always prompts the same package already
exists! Is there any way to delete an application from MarketPlace? Thanks a

Best Regards,


3. How to kill background applications?

4. Async Task Problem

5. Overlay ConcurrentModificationException (continued)

6. Is there a way to get icons for apps on the Market?

7. In which layout it can easy to arrange the more number of editviewfield and textview.