Making a clickable LinearLayout change color on click?

by Romain Guy » Tue, 09 Mar 2010 01:22:20 GMT

Sponsored Links
 > but this will just override the shape background definition I supplied

That's exactly what you have to do!


Other Threads

1. Question about android graphics.

Hi All,

  I am tring to analyse the android graphics. After reading the source
in android, I still have no idea how it works. Here I list a few
questions. Any reply will be welcome.

1.  what is the relationship between ViewRoot and View class. As my
understanding, in each window, there is only one ViewRoot, even though
there are mutil View or ViewGroup shows in that window. The showing
route is started by WindowManagerService as below:
In view::draw, it will draw its data to its canvas and dispatch draw
calling to its children's view.
Is all view ,its children's view and their viewRoot share the same
canvas for draw?

2. What is the relationship within View, canvas and Surface.  To my
thinking, every view will be attached a canvas and surface. And a
canvas hold the bitmap for view, will the actual view drawn data will
be in canvas' bitmap. After View draw its data to canvas, ViewRoot
will call surface.unlockCanvasAndPost(canvas) to schedule
surfaceFlinger::composeSurfaces() which do the actually display to
display panel.

Where is the drawn data in canvas transfer to surface front buffer or
backbuffer? I cannot find the code to do that.

Do different views within the same ViewRoot share the same surface?



2. No targets to build using Android 1.5 SDK...

ah this is a different problem, you aren't configured to be able to
access Java from the command line.

I did a quick google search and found this link that explain how to
set it up:


---------- Forwarded message ----------
From: D. <>
Date: Tue, Apr 14, 2009 at 2:17 PM
Subject: [android-beginners] Re: No targets to build using Android 1.5 SDK...
To: Android Beginners <>

Ok, so within the tools directory, I am trying to enter these commands
without success. Should I be in some sort of shell while doing this?
Here's what I get:

F:\Applications\Android SDK 1.5_pre\tools> android list avds
'java' is not recognized as an internal or external command,
operable program or batch file.

Xavier Ducrohet
Android Engineer, Google.


3. How the use same instances when launching application twice

4. LTTng on Android

5. TDD with Android 1.5

6. Developing absolute layout - no drag drop click drag in eclipse ??

7. Slow Gmail uploads?